printf("ID_CDROM_MEDIA_SESSION_COUNT=%d\n", cd_media_session_count);
if (cd_media_track_count > 0)
printf("ID_CDROM_MEDIA_TRACK_COUNT=%d\n", cd_media_track_count);
- if (cd_media_track_count_audio)
+ 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)
+ 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)
+ 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)
{ "export", 0, NULL, 'x' },
{ "skip-raid", 0, NULL, 's' },
{ "probe-all", 0, NULL, 'a' },
- { "offset", 1, NULL, 'o' },
+ { "offset", 2, NULL, 'o' },
{ "help", 0, NULL, 'h' },
{}
};
probe_all = 1;
break;
case 'o':
- offset = strtoull(optarg, NULL, 0);
+ if (optarg[0] != '\0')
+ offset = strtoull(optarg, NULL, 0);
break;
case 'h':
printf("Usage: vol_id [options] <device>\n"