chiark / gitweb /
cdrom_id: No "next session" for "other" media state
authorJan Drzewiecki <jonie@icpnet.pl>
Sun, 8 Aug 2010 17:22:13 +0000 (19:22 +0200)
committerMartin Pitt <martin.pitt@ubuntu.com>
Sun, 8 Aug 2010 17:22:13 +0000 (19:22 +0200)
"other" is known to apply to DVD-RAMs, where sessions can't be appended.

Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
extras/cdrom_id/cdrom_id.c

index 0ec79e6..fd7d482 100644 (file)
@@ -678,7 +678,8 @@ static int cd_media_info(struct udev *udev, int fd)
        }
 
 determined:
        }
 
 determined:
-       if ((header[2] & 3) != 2)
+       /* "other" is e. g. DVD-RAM, can't append sessions there either */
+       if ((header[2] & 3) < 2)
                cd_media_session_next = header[10] << 8 | header[5];
        cd_media_session_count = header[9] << 8 | header[4];
        cd_media_track_count = header[11] << 8 | header[6];
                cd_media_session_next = header[10] << 8 | header[5];
        cd_media_session_count = header[9] << 8 | header[4];
        cd_media_track_count = header[11] << 8 | header[6];