summaryrefslogtreecommitdiffstats
path: root/commands/usb.c
diff options
context:
space:
mode:
Diffstat (limited to 'commands/usb.c')
-rw-r--r--commands/usb.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/commands/usb.c b/commands/usb.c
index e5030659b4..9aee4308da 100644
--- a/commands/usb.c
+++ b/commands/usb.c
@@ -22,24 +22,20 @@
#include <usb/usb.h>
#include <getopt.h>
-static int scanned;
-
static int do_usb(int argc, char *argv[])
{
int opt;
+ int force = 0;
while ((opt = getopt(argc, argv, "f")) > 0) {
switch (opt) {
case 'f':
- scanned = 0;
+ force = 1;
break;
}
}
- if (!scanned) {
- usb_rescan();
- scanned = 1;
- }
+ usb_rescan(force);
return 0;
}