[PATCH 1/6] main: Always print version, drop -V option
Tormod Volden
lists.tormod at gmail.com
Wed Aug 31 23:26:20 CEST 2011
From: Tormod Volden <debian.tormod at gmail.com>
---
A series of patches for dfu-util.
The alternate interface name features in 4/5/6 will be needed for the
upcoming DfuSE support. Slowly getting there...
Cheers,
Tormod
src/main.c | 14 ++------------
1 files changed, 2 insertions(+), 12 deletions(-)
diff --git a/src/main.c b/src/main.c
index 5f57bee..aaad39a 100644
--- a/src/main.c
+++ b/src/main.c
@@ -466,7 +466,6 @@ static void help(void)
{
printf("Usage: dfu-util [options] ...\n"
" -h --help\t\t\tPrint this help message\n"
- " -V --version\t\t\tPrint the version number\n"
" -v --verbose\t\t\tPrint verbose debug statements\n"
" -l --list\t\t\tList the currently attached DFU capable USB devices\n"
" -d --device vendor:product\tSpecify Vendor/Product ID of DFU device\n"
@@ -482,14 +481,8 @@ static void help(void)
);
}
-static void print_version(void)
-{
- printf("dfu-util version %s\n", VERSION);
-}
-
static struct option opts[] = {
{ "help", 0, 0, 'h' },
- { "version", 0, 0, 'V' },
{ "verbose", 0, 0, 'v' },
{ "list", 0, 0, 'l' },
{ "device", 1, 0, 'd' },
@@ -530,7 +523,8 @@ int main(int argc, char **argv)
int final_reset = 0;
int ret;
- printf("dfu-util - (C) 2005-2008 by Weston Schmidt, Harald Welte and OpenMoko Inc.\n"
+ printf("dfu-util version %s\n", VERSION);
+ printf("(C) 2005-2008 by Weston Schmidt, Harald Welte and OpenMoko Inc.\n"
"This program is Free Software and has ABSOLUTELY NO WARRANTY\n\n");
printf("dfu-util does currently only support DFU version 1.0\n\n");
@@ -557,10 +551,6 @@ int main(int argc, char **argv)
help();
exit(0);
break;
- case 'V':
- print_version();
- exit(0);
- break;
case 'v':
if (verbose) {
libusb_set_debug(ctx, 255);
--
1.7.5.4
More information about the devel
mailing list