]> err.no Git - systemd/commitdiff
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 935f117c4d4c1289abcc0fd0dfa404e3b47d42a9..2bea2e4b0c9e1b9f5cc50e2b76afcf8442a40a0d 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);