From 898e5d4ca5f8b1a7b56bcaf4710656ba798f2264 Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Tue, 25 May 2010 09:47:04 +0200 Subject: [PATCH] cdrom_id: do not export ID_CDROM_MEDIA_SESSION_LAST_OFFSET= for single session media --- extras/cdrom_id/cdrom_id.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c index 935f117c..2bea2e4b 100644 --- a/extras/cdrom_id/cdrom_id.c +++ b/extras/cdrom_id/cdrom_id.c @@ -810,14 +810,14 @@ print: printf("ID_CDROM_MEDIA_SESSION_NEXT=%d\n", cd_media_session_next); if (cd_media_session_count > 0) printf("ID_CDROM_MEDIA_SESSION_COUNT=%d\n", cd_media_session_count); + if (cd_media_session_count > 1 && cd_media_session_last_offset > 0) + printf("ID_CDROM_MEDIA_SESSION_LAST_OFFSET=%llu\n", cd_media_session_last_offset); if (cd_media_track_count > 0) printf("ID_CDROM_MEDIA_TRACK_COUNT=%d\n", cd_media_track_count); if (cd_media_track_count_audio > 0) printf("ID_CDROM_MEDIA_TRACK_COUNT_AUDIO=%d\n", cd_media_track_count_audio); if (cd_media_track_count_data > 0) printf("ID_CDROM_MEDIA_TRACK_COUNT_DATA=%d\n", cd_media_track_count_data); - if (cd_media_session_last_offset > 0) - printf("ID_CDROM_MEDIA_SESSION_LAST_OFFSET=%llu\n", cd_media_session_last_offset); exit: if (fd >= 0) close(fd); -- 2.39.5