diff options
Diffstat (limited to 'fastboot/fastboot.cpp')
-rw-r--r-- | fastboot/fastboot.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/fastboot/fastboot.cpp b/fastboot/fastboot.cpp index 51985af..c9a6772 100644 --- a/fastboot/fastboot.cpp +++ b/fastboot/fastboot.cpp @@ -964,8 +964,9 @@ int main(int argc, char **argv) {"page_size", required_argument, 0, 'n'}, {"ramdisk_offset", required_argument, 0, 'r'}, {"tags_offset", required_argument, 0, 't'}, - {"help", 0, 0, 'h'}, - {"unbuffered", 0, 0, 0}, + {"help", no_argument, 0, 'h'}, + {"unbuffered", no_argument, 0, 0}, + {"version", no_argument, 0, 0}, {0, 0, 0, 0} }; @@ -1037,6 +1038,9 @@ int main(int argc, char **argv) if (strcmp("unbuffered", longopts[longindex].name) == 0) { setvbuf(stdout, NULL, _IONBF, 0); setvbuf(stderr, NULL, _IONBF, 0); + } else if (strcmp("version", longopts[longindex].name) == 0) { + fprintf(stdout, "fastboot version %s\n", FASTBOOT_REVISION); + return 0; } break; default: |