summaryrefslogtreecommitdiff
path: root/extras/cdrom_id
diff options
context:
space:
mode:
authorJan Drzewiecki <jonie@icpnet.pl>2010-08-08 19:22:13 +0200
committerMartin Pitt <martin.pitt@ubuntu.com>2010-08-08 19:22:13 +0200
commit45b1d780b960f3bcad84ae8a2702cdcf43b3e5cb (patch)
treebf19dd15f5f6bb70d5ec25721557a9ad386304db /extras/cdrom_id
parenta6b03c09617354d729cedada9e63dc2a595c0c62 (diff)
cdrom_id: No "next session" for "other" media state
"other" is known to apply to DVD-RAMs, where sessions can't be appended. Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
Diffstat (limited to 'extras/cdrom_id')
-rw-r--r--extras/cdrom_id/cdrom_id.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c
index 0ec79e677b..fd7d482f89 100644
--- a/extras/cdrom_id/cdrom_id.c
+++ b/extras/cdrom_id/cdrom_id.c
@@ -678,7 +678,8 @@ static int cd_media_info(struct udev *udev, int fd)
}
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];