Abort less often - just report an error.

This commit is contained in:
rocky
2003-10-03 08:32:32 +00:00
parent 980822f07f
commit ae84a8ee00
2 changed files with 8 additions and 7 deletions

View File

@@ -1,5 +1,5 @@
/* /*
$Id: _cdio_nrg.c,v 1.20 2003/09/30 03:26:11 rocky Exp $ $Id: _cdio_nrg.c,v 1.21 2003/10/03 08:32:32 rocky Exp $
Copyright (C) 2001,2003 Herbert Valerio Riedel <hvr@gnu.org> Copyright (C) 2001,2003 Herbert Valerio Riedel <hvr@gnu.org>
@@ -47,7 +47,7 @@
#include "cdio_private.h" #include "cdio_private.h"
#include "_cdio_stdio.h" #include "_cdio_stdio.h"
static const char _rcsid[] = "$Id: _cdio_nrg.c,v 1.20 2003/09/30 03:26:11 rocky Exp $"; static const char _rcsid[] = "$Id: _cdio_nrg.c,v 1.21 2003/10/03 08:32:32 rocky Exp $";
/* structures used */ /* structures used */
@@ -219,6 +219,7 @@ _cdio_parse_nero_footer (_img_private_t *_obj)
return 0; return 0;
size = cdio_stream_stat (_obj->gen.data_source); size = cdio_stream_stat (_obj->gen.data_source);
if (-1 == size) return false;
{ {
PRAGMA_BEGIN_PACKED PRAGMA_BEGIN_PACKED
@@ -237,7 +238,7 @@ PRAGMA_END_PACKED
cdio_assert (sizeof (buf) == 12); cdio_assert (sizeof (buf) == 12);
cdio_stream_seek (_obj->gen.data_source, size - sizeof (buf), SEEK_SET); cdio_stream_seek (_obj->gen.data_source, size - sizeof (buf), SEEK_SET);
cdio_stream_read (_obj->gen.data_source, (void *) &buf, sizeof (buf), 1); cdio_stream_read (_obj->gen.data_source, (void *) &buf, sizeof (buf), 1);
if (buf.v50.ID == UINT32_TO_BE (0x4e45524f)) /* "NERO" */ if (buf.v50.ID == UINT32_TO_BE (0x4e45524f)) /* "NERO" */
@@ -252,7 +253,7 @@ PRAGMA_END_PACKED
} }
else else
{ {
cdio_error ("Image not recognized as either v50 or v55 type NRG"); cdio_warn ("Image not recognized as either v50 or v55 type NRG");
return -1; return -1;
} }

View File

@@ -1,5 +1,5 @@
/* /*
$Id: _cdio_stream.c,v 1.6 2003/04/22 12:09:09 rocky Exp $ $Id: _cdio_stream.c,v 1.7 2003/10/03 08:32:32 rocky Exp $
Copyright (C) 2000 Herbert Valerio Riedel <hvr@gnu.org> Copyright (C) 2000 Herbert Valerio Riedel <hvr@gnu.org>
@@ -34,7 +34,7 @@
#include <cdio/util.h> #include <cdio/util.h>
#include "_cdio_stream.h" #include "_cdio_stream.h"
static const char _rcsid[] = "$Id: _cdio_stream.c,v 1.6 2003/04/22 12:09:09 rocky Exp $"; static const char _rcsid[] = "$Id: _cdio_stream.c,v 1.7 2003/10/03 08:32:32 rocky Exp $";
/* /*
* DataSource implementations * DataSource implementations
@@ -58,7 +58,7 @@ _cdio_stream_open_if_necessary(CdioDataSource *obj)
if (!obj->is_open) { if (!obj->is_open) {
if (obj->op.open(obj->user_data)) { if (obj->op.open(obj->user_data)) {
cdio_error ("could not open input stream..."); cdio_warn ("could not open input stream...");
return false; return false;
} else { } else {
cdio_debug ("opened source..."); cdio_debug ("opened source...");