]> err.no Git - systemd/commitdiff
cdrom_id: READ TOC before READ DISC INFORMATION fixes qemu
authorHarald Hoyer <harald@redhat.com>
Wed, 11 Aug 2010 13:20:31 +0000 (15:20 +0200)
committerHarald Hoyer <harald@redhat.com>
Wed, 11 Aug 2010 13:21:33 +0000 (15:21 +0200)
extras/cdrom_id/cdrom_id.c

index 5086bfa64fc1d42aded694d725f047dfad2f527c..889b2342e8a023dc8fab4f446a29b568fe92ca7b 100644 (file)
@@ -868,14 +868,14 @@ int main(int argc, char *argv[])
        if (cd_profiles(udev, fd) < 0)
                goto print;
 
-       /* get writable media state */
-       if (cd_media_info(udev, fd) < 0)
-               goto print;
-
        /* get session/track info */
        if (cd_media_toc(udev, fd) < 0)
                goto print;
 
+       /* get writable media state */
+       if (cd_media_info(udev, fd) < 0)
+               goto print;
+
 print:
        printf("ID_CDROM=1\n");
        if (cd_cd_rom)