(void) argc;
(void) argv;
- printf("%s\n", usbip_version_string);
+ printf(PROGNAME " (%s)\n", usbip_version_string);
return 0;
}
static int run_command(const struct command *cmd, int argc, char *argv[])
{
- dbg("running command: `%s'\n", cmd->name);
+ dbg("running command: `%s'", cmd->name);
return cmd->fn(argc, argv);
}
usbip_use_syslog = 1;
openlog("", LOG_PID, LOG_USER);
break;
+ case '?':
+ printf("usbip: invalid option\n");
default:
- goto err_out;
+ usbip_usage();
+ goto out;
}
}
}
}
-err_out:
- usbip_usage();
+ /* invalid command */
+ usbip_help(0, NULL);
out:
return (rc > -1 ? EXIT_SUCCESS : EXIT_FAILURE);
}