chiark / gitweb /
cdrom_id: Still check profiles even if there is no media
authorDavid Zeuthen <davidz@redhat.com>
Tue, 10 Nov 2009 17:32:38 +0000 (12:32 -0500)
committerDavid Zeuthen <davidz@redhat.com>
Tue, 10 Nov 2009 17:32:38 +0000 (12:32 -0500)
Even when there is no medium in the drive, we should still check the
profiles supported by the drive. Otherwise we fail to detect things
like Blu-ray drives. See

 https://bugzilla.gnome.org/show_bug.cgi?id=600273

for more information.

Signed-off-by: David Zeuthen <davidz@redhat.com>
extras/cdrom_id/cdrom_id.c

index 6ea763b415b3fdfca21d0663b162141beafa566c..2380b158a07ece9cb076b3fb82434fd1c9f5b2ff 100644 (file)
@@ -583,9 +583,9 @@ int main(int argc, char *argv[])
                goto exit;
        }
 
                goto exit;
        }
 
-       /* check for media */
-       if (cd_media_compat(udev, fd) < 0)
-               goto print;
+       /* check for media - don't bail if there's no media as we still need to
+         * to read profiles */
+       cd_media_compat(udev, fd);
 
        /* check if drive talks MMC */
        if (cd_inquiry(udev, fd) < 0)
 
        /* check if drive talks MMC */
        if (cd_inquiry(udev, fd) < 0)