_cdio_osx.c: wasnt' returning CDIO_INVALID_TRACK on TOC read error.
cd-info.c: abort sooner if we can't read the TOC.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
$Id: _cdio_osx.c,v 1.64 2004/08/29 03:45:34 rocky Exp $
|
||||
$Id: _cdio_osx.c,v 1.65 2004/08/30 01:14:14 rocky Exp $
|
||||
|
||||
Copyright (C) 2003, 2004 Rocky Bernstein <rocky@panix.com>
|
||||
from vcdimager code:
|
||||
@@ -34,7 +34,7 @@
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
static const char _rcsid[] = "$Id: _cdio_osx.c,v 1.64 2004/08/29 03:45:34 rocky Exp $";
|
||||
static const char _rcsid[] = "$Id: _cdio_osx.c,v 1.65 2004/08/30 01:14:14 rocky Exp $";
|
||||
|
||||
#include <cdio/sector.h>
|
||||
#include <cdio/util.h>
|
||||
@@ -1097,6 +1097,7 @@ _get_first_track_num_osx(void *user_data)
|
||||
_img_private_t *p_env = user_data;
|
||||
|
||||
if (!p_env->gen.toc_init) read_toc_osx (p_env) ;
|
||||
if (!p_env->gen.toc_init) return CDIO_INVALID_TRACK;
|
||||
|
||||
return p_env->i_first_track;
|
||||
}
|
||||
@@ -1131,6 +1132,7 @@ _get_num_tracks_osx(void *user_data)
|
||||
_img_private_t *p_env = user_data;
|
||||
|
||||
if (!p_env->gen.toc_init) read_toc_osx (p_env) ;
|
||||
if (!p_env->gen.toc_init) return CDIO_INVALID_TRACK;
|
||||
|
||||
return( TOTAL_TRACKS );
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
$Id: cd-info.c,v 1.86 2004/08/30 01:01:14 rocky Exp $
|
||||
$Id: cd-info.c,v 1.87 2004/08/30 01:14:14 rocky Exp $
|
||||
|
||||
Copyright (C) 2003, 2004 Rocky Bernstein <rocky@panix.com>
|
||||
Copyright (C) 1996, 1997, 1998 Gerd Knorr <kraxel@bytesex.org>
|
||||
@@ -1040,7 +1040,12 @@ main(int argc, const char *argv[])
|
||||
}
|
||||
|
||||
i_first_track = cdio_get_first_track_num(p_cdio);
|
||||
i_tracks = cdio_get_num_tracks(p_cdio);
|
||||
|
||||
if (CDIO_INVALID_TRACK == i_first_track) {
|
||||
err_exit("Can't number of tracks, I give up.\n");
|
||||
}
|
||||
|
||||
i_tracks = cdio_get_num_tracks(p_cdio);
|
||||
|
||||
if (!opts.no_tracks) {
|
||||
printf("CD-ROM Track List (%i - %i)\n" NORMAL,
|
||||
|
||||
Reference in New Issue
Block a user