projects
/
platform
/
upstream
/
v4l-utils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
31a1c72
)
get_media_device: Continue with the next dir entry on a sysfs parse error
author
Hans de Goede
<hdegoede@redhat.com>
Sat, 18 Jun 2011 13:13:40 +0000
(15:13 +0200)
committer
Hans de Goede
<hdegoede@redhat.com>
Sat, 18 Jun 2011 13:31:37 +0000
(15:31 +0200)
Rather then completely aborting the sysfs-scanning.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
utils/libmedia_dev/get_media_devices.c
patch
|
blob
|
history
diff --git
a/utils/libmedia_dev/get_media_devices.c
b/utils/libmedia_dev/get_media_devices.c
index
492a317
..
403f394
100644
(file)
--- a/
utils/libmedia_dev/get_media_devices.c
+++ b/
utils/libmedia_dev/get_media_devices.c
@@
-125,7
+125,7
@@
static int get_class(char *class,
/* Remove the subsystem/class_name from the string */
p = strstr(device, class);
if (!p)
-
goto error
;
+
continue
;
*(p - 1) = '\0';
/* Remove USB sub-devices from the path */
@@
-133,7
+133,7
@@
static int get_class(char *class,
do {
p = strrchr(device, '/');
if (!p)
-
goto error
;
+
continue
;
if (!strpbrk(p, ":."))
break;
*p = '\0';