Add version command to oxfstool
This commit is contained in:
@@ -13,6 +13,7 @@
|
|||||||
|
|
||||||
using namespace ox::fs;
|
using namespace ox::fs;
|
||||||
|
|
||||||
|
const static auto oxfstoolVersion = "1.0.0";
|
||||||
const char *usage = "usage:\n"
|
const char *usage = "usage:\n"
|
||||||
"\toxfs format [16,32,64] <size> <path>\n"
|
"\toxfs format [16,32,64] <size> <path>\n"
|
||||||
"\toxfs read <FS file> <inode>\n"
|
"\toxfs read <FS file> <inode>\n"
|
||||||
@@ -258,6 +259,9 @@ int main(int argc, char **args) {
|
|||||||
err = remove(argc, args);
|
err = remove(argc, args);
|
||||||
} else if (::strcmp(cmd, "help") == 0) {
|
} else if (::strcmp(cmd, "help") == 0) {
|
||||||
printf("%s\n", usage);
|
printf("%s\n", usage);
|
||||||
|
} else if (::strcmp(cmd, "version") == 0) {
|
||||||
|
printf("oxfstool version %s\n", oxfstoolVersion);
|
||||||
|
printf("oxfs format version %d\n", FileStore16::version());
|
||||||
} else {
|
} else {
|
||||||
printf("Command '%s' not recognized.\n", cmd);
|
printf("Command '%s' not recognized.\n", cmd);
|
||||||
err = 1;
|
err = 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user