chiark / gitweb /
cdrom_id: do not export ID_CDROM_MEDIA_SESSION_LAST_OFFSET= for single session media
authorKay Sievers <kay.sievers@vrfy.org>
Tue, 25 May 2010 07:47:04 +0000 (09:47 +0200)
committerKay Sievers <kay.sievers@vrfy.org>
Tue, 25 May 2010 07:47:04 +0000 (09:47 +0200)
extras/cdrom_id/cdrom_id.c

index 935f117..2bea2e4 100644 (file)
@@ -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);