get_media_devices: don't bail out if one of the clases is not available
authorMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 23 May 2011 09:11:31 +0000 (06:11 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 23 May 2011 09:11:31 +0000 (06:11 -0300)
For now, it requires that all dvb, v4l and sound classes to be available,
otherwise, an error happens.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
utils/libv4l2util/get_media_devices.c

index d8c65ef..af399c6 100644 (file)
@@ -64,7 +64,7 @@ static int get_class(char *class,
        dir = opendir(dname);
        if (!dir) {
                perror(dname);
-               return -1;
+               return 0;
        }
        for (entry = readdir(dir); entry; entry = readdir(dir)) {
                sprintf(fname, "%s/%s", dname, entry->d_name);