[PATCH] e4defrag: Add a version number

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add the e2fsprogs version number to e4defrag.
Display the version number prior to the usage message.

Signed-off-by: Marc Thomas <marc@xxxxxxxxxxxxxxxxxx>
---
 misc/e4defrag.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/misc/e4defrag.c b/misc/e4defrag.c
index 1d1b4f41..86056fdd 100644
--- a/misc/e4defrag.c
+++ b/misc/e4defrag.c
@@ -40,6 +40,7 @@
 #include <sys/stat.h>
 #include <sys/statfs.h>
 #include <sys/vfs.h>
+#include "../version.h"
  /* A relatively new ioctl interface ... */
 #ifndef EXT4_IOC_MOVE_EXT
@@ -2026,6 +2027,7 @@ int main(int argc, char *argv[])
 	exit(1);
  out:
+	printf("e4defrag %s (%s)\n", E2FSPROGS_VERSION, E2FSPROGS_DATE);
 	printf(MSG_USAGE);
 	exit(1);
 }
-- 
2.13.0




[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux