]> git.sesse.net Git - bcachefs-tools-debian/blobdiff - bcachefs.c
Added 'version' command to print when the bcachefs tool was built
[bcachefs-tools-debian] / bcachefs.c
index 1c56ead736394cb0ea3f1bf9249b69b35bd41539..910e0b16fadfe44d63da2e55ecfd7c13044b6232 100644 (file)
@@ -70,7 +70,10 @@ static void usage(void)
             "Debug:\n"
             "These commands work on offline, unmounted filesystems\n"
             "  dump                 Dump filesystem metadata to a qcow2 image\n"
-            "  list                 List filesystem metadata in textual form\n");
+            "  list                 List filesystem metadata in textual form\n"
+            "\n"
+            "Miscellaneous:\n"
+            "  version              Display the version of the invoked bcachefs tool\n");
 }
 
 static char *full_cmd;
@@ -144,6 +147,8 @@ int main(int argc, char *argv[])
 
        char *cmd = pop_cmd(&argc, argv);
 
+       if (!strcmp(cmd, "version"))
+               return cmd_version(argc, argv);
        if (!strcmp(cmd, "format"))
                return cmd_format(argc, argv);
        if (!strcmp(cmd, "show-super"))