Hi,
This patch makes lsusb compatible with kernel >= 2.6.32

Thanks.
diff -urpN busybox-1.16.0/util-linux/lsusb.c busybox-1.16.0-lsusb/util-linux/lsusb.c
--- busybox-1.16.0/util-linux/lsusb.c	2010-01-25 01:59:39.000000000 +0100
+++ busybox-1.16.0-lsusb/util-linux/lsusb.c	2010-03-03 22:16:36.632723933 +0100
@@ -15,22 +15,22 @@
 		int depth UNUSED_PARAM)
 {
 	parser_t *parser;
-	char *tokens[6];
+	char *tokens[5];
 	char *bus = NULL, *device = NULL;
 	int product_vid = 0, product_did = 0;
-
 	char *uevent_filename = concat_path_file(fileName, "/uevent");
+
 	parser = config_open2(uevent_filename, fopen_for_read);
 	free(uevent_filename);

-	while (config_read(parser, tokens, 6, 1, "\\/=", PARSE_NORMAL)) {
+	while (config_read(parser, tokens, 5, 1, "\\/=", PARSE_NORMAL)) {
 		if ((parser->lineno == 1) && strcmp(tokens[0], "DEVTYPE") == 0) {
 			break;
 		}

-		if (strcmp(tokens[0], "DEVICE") == 0) {
-			bus = xstrdup(tokens[4]);
-			device = xstrdup(tokens[5]);
+		if (strcmp(tokens[0], "DEVNAME") == 0) {
+			bus = xstrdup(tokens[3]);
+			device = xstrdup(tokens[4]);
 			continue;
 		}
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to