diff options
author | Sergei Shtylyov <sshtylyov@dev.rtsoft.ru> | 2013-02-08 10:48:03 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-02-08 15:15:24 -0500 |
commit | 9742aecda4d02976535051db4af4830bd98373a1 (patch) | |
tree | 5b26c84da1360b0d20a06c5732c3378aa7f9cfc9 /tools | |
parent | ceb675a9e25c0c11f76f8e72a862caf08d3934d3 (diff) |
testusb: remove all mentions of 'usbfs'
Commit 8a424bf40d772fedacc91862ecc86f10541fabb3 (tools/usb: remove last USBFS
user) removed 'usbfs' files from the source but retained mentions of 'usbfs'
all over the place, most importantly in the misleading error messages printed
in case USB device files are not there. Remove all the mentions of 'usbfs'
for good now!
Signed-off-by: Sergei Shtylyov <sshtylyov@dev.rtsoft.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/usb/testusb.c | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/tools/usb/testusb.c b/tools/usb/testusb.c index 643cd77fa980..879f9870a6bc 100644 --- a/tools/usb/testusb.c +++ b/tools/usb/testusb.c | |||
@@ -279,8 +279,7 @@ nomem: | |||
279 | 279 | ||
280 | entry->ifnum = ifnum; | 280 | entry->ifnum = ifnum; |
281 | 281 | ||
282 | /* FIXME ask usbfs what speed; update USBDEVFS_CONNECTINFO so | 282 | /* FIXME update USBDEVFS_CONNECTINFO so it tells about high speed etc */ |
283 | * it tells about high speed etc */ | ||
284 | 283 | ||
285 | fprintf(stderr, "%s speed\t%s\t%u\n", | 284 | fprintf(stderr, "%s speed\t%s\t%u\n", |
286 | speed(entry->speed), entry->name, entry->ifnum); | 285 | speed(entry->speed), entry->name, entry->ifnum); |
@@ -351,7 +350,7 @@ restart: | |||
351 | return arg; | 350 | return arg; |
352 | } | 351 | } |
353 | 352 | ||
354 | static const char *usbfs_dir_find(void) | 353 | static const char *usb_dir_find(void) |
355 | { | 354 | { |
356 | static char udev_usb_path[] = "/dev/bus/usb"; | 355 | static char udev_usb_path[] = "/dev/bus/usb"; |
357 | 356 | ||
@@ -380,7 +379,7 @@ int main (int argc, char **argv) | |||
380 | int c; | 379 | int c; |
381 | struct testdev *entry; | 380 | struct testdev *entry; |
382 | char *device; | 381 | char *device; |
383 | const char *usbfs_dir = NULL; | 382 | const char *usb_dir = NULL; |
384 | int all = 0, forever = 0, not = 0; | 383 | int all = 0, forever = 0, not = 0; |
385 | int test = -1 /* all */; | 384 | int test = -1 /* all */; |
386 | struct usbtest_param param; | 385 | struct usbtest_param param; |
@@ -407,8 +406,8 @@ int main (int argc, char **argv) | |||
407 | case 'D': /* device, if only one */ | 406 | case 'D': /* device, if only one */ |
408 | device = optarg; | 407 | device = optarg; |
409 | continue; | 408 | continue; |
410 | case 'A': /* use all devices with specified usbfs dir */ | 409 | case 'A': /* use all devices with specified USB dir */ |
411 | usbfs_dir = optarg; | 410 | usb_dir = optarg; |
412 | /* FALL THROUGH */ | 411 | /* FALL THROUGH */ |
413 | case 'a': /* use all devices */ | 412 | case 'a': /* use all devices */ |
414 | device = NULL; | 413 | device = NULL; |
@@ -449,7 +448,7 @@ usage: | |||
449 | "usage: %s [options]\n" | 448 | "usage: %s [options]\n" |
450 | "Options:\n" | 449 | "Options:\n" |
451 | "\t-D dev only test specific device\n" | 450 | "\t-D dev only test specific device\n" |
452 | "\t-A usbfs-dir\n" | 451 | "\t-A usb-dir\n" |
453 | "\t-a test all recognized devices\n" | 452 | "\t-a test all recognized devices\n" |
454 | "\t-l loop forever(for stress test)\n" | 453 | "\t-l loop forever(for stress test)\n" |
455 | "\t-t testnum only run specified case\n" | 454 | "\t-t testnum only run specified case\n" |
@@ -470,18 +469,18 @@ usage: | |||
470 | goto usage; | 469 | goto usage; |
471 | } | 470 | } |
472 | 471 | ||
473 | /* Find usbfs mount point */ | 472 | /* Find usb device subdirectory */ |
474 | if (!usbfs_dir) { | 473 | if (!usb_dir) { |
475 | usbfs_dir = usbfs_dir_find(); | 474 | usb_dir = usb_dir_find(); |
476 | if (!usbfs_dir) { | 475 | if (!usb_dir) { |
477 | fputs ("usbfs files are missing\n", stderr); | 476 | fputs ("USB device files are missing\n", stderr); |
478 | return -1; | 477 | return -1; |
479 | } | 478 | } |
480 | } | 479 | } |
481 | 480 | ||
482 | /* collect and list the test devices */ | 481 | /* collect and list the test devices */ |
483 | if (ftw (usbfs_dir, find_testdev, 3) != 0) { | 482 | if (ftw (usb_dir, find_testdev, 3) != 0) { |
484 | fputs ("ftw failed; is usbfs missing?\n", stderr); | 483 | fputs ("ftw failed; are USB device files missing?\n", stderr); |
485 | return -1; | 484 | return -1; |
486 | } | 485 | } |
487 | 486 | ||