summaryrefslogtreecommitdiffstatshomepage
path: root/src/tools/floptool.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/floptool.cpp')
-rw-r--r--src/tools/floptool.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/tools/floptool.cpp b/src/tools/floptool.cpp
index b69c3fe1881..9632fe4eeca 100644
--- a/src/tools/floptool.cpp
+++ b/src/tools/floptool.cpp
@@ -35,6 +35,7 @@ static void display_usage()
fprintf(stderr, " floptool.exe flopdir input_format filesystem <image> -- List the contents of a floppy image\n");
fprintf(stderr, " floptool.exe flopread input_format filesystem <image> <path> <outputfile> -- Extract a file from a floppy image\n");
fprintf(stderr, " floptool.exe flopwrite input_format filesystem <image> <inputfile> <path> -- Write a file into a floppy image\n");
+ fprintf(stderr, " floptool.exe version -- Display the current version of floptool\n");
}
static void display_formats()
@@ -675,6 +676,13 @@ static int hdwrite(int argc, char *argv[])
return generic_write(ih, argv[4], argv[5]);
}
+static int version(int argc, char *argv[])
+{
+ extern const char build_version[];
+ fprintf(stdout, "%s\n", build_version);
+ return 0;
+}
+
int CLIB_DECL main(int argc, char *argv[])
{
formats.init();
@@ -703,6 +711,8 @@ int CLIB_DECL main(int argc, char *argv[])
return hdread(argc, argv);
else if(!core_stricmp("hdwrite", argv[1]))
return hdwrite(argc, argv);
+ else if (!core_stricmp("version", argv[1]))
+ return version(argc, argv);
else {
fprintf(stderr, "Unknown command '%s'\n\n", argv[1]);
display_usage();