From: Kay Sievers Date: Tue, 25 May 2010 07:47:04 +0000 (+0200) Subject: cdrom_id: do not export ID_CDROM_MEDIA_SESSION_LAST_OFFSET= for single session media X-Git-Tag: 174~482 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=898e5d4ca5f8b1a7b56bcaf4710656ba798f2264;p=systemd cdrom_id: do not export ID_CDROM_MEDIA_SESSION_LAST_OFFSET= for single session media --- 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);