Commit 9742aecd authored by Sergei Shtylyov's avatar Sergei Shtylyov Committed by Greg Kroah-Hartman

testusb: remove all mentions of 'usbfs'

Commit 8a424bf4 (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: default avatarSergei Shtylyov <sshtylyov@dev.rtsoft.ru>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ceb675a9
...@@ -279,8 +279,7 @@ static int find_testdev(const char *name, const struct stat *sb, int flag) ...@@ -279,8 +279,7 @@ static int find_testdev(const char *name, const struct stat *sb, int flag)
entry->ifnum = ifnum; entry->ifnum = ifnum;
/* FIXME ask usbfs what speed; update USBDEVFS_CONNECTINFO so /* FIXME update USBDEVFS_CONNECTINFO so it tells about high speed etc */
* it tells about high speed etc */
fprintf(stderr, "%s speed\t%s\t%u\n", fprintf(stderr, "%s speed\t%s\t%u\n",
speed(entry->speed), entry->name, entry->ifnum); speed(entry->speed), entry->name, entry->ifnum);
...@@ -351,7 +350,7 @@ static void *handle_testdev (void *arg) ...@@ -351,7 +350,7 @@ static void *handle_testdev (void *arg)
return arg; return arg;
} }
static const char *usbfs_dir_find(void) static const char *usb_dir_find(void)
{ {
static char udev_usb_path[] = "/dev/bus/usb"; static char udev_usb_path[] = "/dev/bus/usb";
...@@ -380,7 +379,7 @@ int main (int argc, char **argv) ...@@ -380,7 +379,7 @@ int main (int argc, char **argv)
int c; int c;
struct testdev *entry; struct testdev *entry;
char *device; char *device;
const char *usbfs_dir = NULL; const char *usb_dir = NULL;
int all = 0, forever = 0, not = 0; int all = 0, forever = 0, not = 0;
int test = -1 /* all */; int test = -1 /* all */;
struct usbtest_param param; struct usbtest_param param;
...@@ -407,8 +406,8 @@ int main (int argc, char **argv) ...@@ -407,8 +406,8 @@ int main (int argc, char **argv)
case 'D': /* device, if only one */ case 'D': /* device, if only one */
device = optarg; device = optarg;
continue; continue;
case 'A': /* use all devices with specified usbfs dir */ case 'A': /* use all devices with specified USB dir */
usbfs_dir = optarg; usb_dir = optarg;
/* FALL THROUGH */ /* FALL THROUGH */
case 'a': /* use all devices */ case 'a': /* use all devices */
device = NULL; device = NULL;
...@@ -449,7 +448,7 @@ int main (int argc, char **argv) ...@@ -449,7 +448,7 @@ int main (int argc, char **argv)
"usage: %s [options]\n" "usage: %s [options]\n"
"Options:\n" "Options:\n"
"\t-D dev only test specific device\n" "\t-D dev only test specific device\n"
"\t-A usbfs-dir\n" "\t-A usb-dir\n"
"\t-a test all recognized devices\n" "\t-a test all recognized devices\n"
"\t-l loop forever(for stress test)\n" "\t-l loop forever(for stress test)\n"
"\t-t testnum only run specified case\n" "\t-t testnum only run specified case\n"
...@@ -470,18 +469,18 @@ int main (int argc, char **argv) ...@@ -470,18 +469,18 @@ int main (int argc, char **argv)
goto usage; goto usage;
} }
/* Find usbfs mount point */ /* Find usb device subdirectory */
if (!usbfs_dir) { if (!usb_dir) {
usbfs_dir = usbfs_dir_find(); usb_dir = usb_dir_find();
if (!usbfs_dir) { if (!usb_dir) {
fputs ("usbfs files are missing\n", stderr); fputs ("USB device files are missing\n", stderr);
return -1; return -1;
} }
} }
/* collect and list the test devices */ /* collect and list the test devices */
if (ftw (usbfs_dir, find_testdev, 3) != 0) { if (ftw (usb_dir, find_testdev, 3) != 0) {
fputs ("ftw failed; is usbfs missing?\n", stderr); fputs ("ftw failed; are USB device files missing?\n", stderr);
return -1; return -1;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment