Note TOC's initialized so we don't reread. Add some int's to unsigned.
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
$Id: _cdio_bsdi.c,v 1.10 2003/05/16 07:18:27 rocky Exp $
|
$Id: _cdio_bsdi.c,v 1.11 2003/09/01 15:11:36 rocky Exp $
|
||||||
|
|
||||||
Copyright (C) 2001 Herbert Valerio Riedel <hvr@gnu.org>
|
Copyright (C) 2001 Herbert Valerio Riedel <hvr@gnu.org>
|
||||||
Copyright (C) 2002,2003 Rocky Bernstein <rocky@panix.com>
|
Copyright (C) 2002,2003 Rocky Bernstein <rocky@panix.com>
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
# include "config.h"
|
# include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static const char _rcsid[] = "$Id: _cdio_bsdi.c,v 1.10 2003/05/16 07:18:27 rocky Exp $";
|
static const char _rcsid[] = "$Id: _cdio_bsdi.c,v 1.11 2003/09/01 15:11:36 rocky Exp $";
|
||||||
|
|
||||||
#include <cdio/sector.h>
|
#include <cdio/sector.h>
|
||||||
#include <cdio/util.h>
|
#include <cdio/util.h>
|
||||||
@@ -167,7 +167,7 @@ _read_mode2_sector (void *user_data, void *data, lsn_t lsn,
|
|||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
_read_mode2_sectors (void *user_data, void *data, lsn_t lsn,
|
_read_mode2_sectors (void *user_data, void *data, lsn_t lsn,
|
||||||
bool mode2_form2, unsigned nblocks)
|
bool mode2_form2, unsigned int nblocks)
|
||||||
{
|
{
|
||||||
_img_private_t *_obj = user_data;
|
_img_private_t *_obj = user_data;
|
||||||
int i;
|
int i;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
$Id: _cdio_freebsd.c,v 1.14 2003/05/27 02:58:22 rocky Exp $
|
$Id: _cdio_freebsd.c,v 1.15 2003/09/01 15:11:36 rocky Exp $
|
||||||
|
|
||||||
Copyright (C) 2003 Rocky Bernstein <rocky@panix.com>
|
Copyright (C) 2003 Rocky Bernstein <rocky@panix.com>
|
||||||
|
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
# include "config.h"
|
# include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static const char _rcsid[] = "$Id: _cdio_freebsd.c,v 1.14 2003/05/27 02:58:22 rocky Exp $";
|
static const char _rcsid[] = "$Id: _cdio_freebsd.c,v 1.15 2003/09/01 15:11:36 rocky Exp $";
|
||||||
|
|
||||||
#include <cdio/sector.h>
|
#include <cdio/sector.h>
|
||||||
#include <cdio/util.h>
|
#include <cdio/util.h>
|
||||||
@@ -90,15 +90,15 @@ _set_bsize (int fd, unsigned int bsize)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
_read_mode2 (int fd, void *buf, lba_t lba, unsigned nblocks,
|
_read_mode2 (int fd, void *buf, lba_t lba, unsigned int nblocks,
|
||||||
bool _workaround)
|
bool _workaround)
|
||||||
{
|
{
|
||||||
unsigned l = 0;
|
unsigned int l = 0;
|
||||||
int retval = 0;
|
int retval = 0;
|
||||||
|
|
||||||
while (nblocks > 0)
|
while (nblocks > 0)
|
||||||
{
|
{
|
||||||
const unsigned nblocks2 = (nblocks > 25) ? 25 : nblocks;
|
const unsigned int nblocks2 = (nblocks > 25) ? 25 : nblocks;
|
||||||
void *buf2 = ((char *)buf ) + (l * M2RAW_SECTOR_SIZE);
|
void *buf2 = ((char *)buf ) + (l * M2RAW_SECTOR_SIZE);
|
||||||
|
|
||||||
retval |= __read_mode2 (fd, buf2, lba + l, nblocks2, _workaround);
|
retval |= __read_mode2 (fd, buf2, lba + l, nblocks2, _workaround);
|
||||||
@@ -206,7 +206,7 @@ _cdio_read_mode2_sector (void *user_data, void *data, lsn_t lsn,
|
|||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
_cdio_read_mode2_sectors (void *user_data, void *data, lsn_t lsn,
|
_cdio_read_mode2_sectors (void *user_data, void *data, lsn_t lsn,
|
||||||
bool mode2_form2, unsigned nblocks)
|
bool mode2_form2, unsigned int nblocks)
|
||||||
{
|
{
|
||||||
_img_private_t *_obj = user_data;
|
_img_private_t *_obj = user_data;
|
||||||
int i;
|
int i;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
$Id: _cdio_linux.c,v 1.15 2003/09/01 02:02:03 rocky Exp $
|
$Id: _cdio_linux.c,v 1.16 2003/09/01 15:11:36 rocky Exp $
|
||||||
|
|
||||||
Copyright (C) 2001 Herbert Valerio Riedel <hvr@gnu.org>
|
Copyright (C) 2001 Herbert Valerio Riedel <hvr@gnu.org>
|
||||||
Copyright (C) 2002,2003 Rocky Bernstein <rocky@panix.com>
|
Copyright (C) 2002,2003 Rocky Bernstein <rocky@panix.com>
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
# include "config.h"
|
# include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static const char _rcsid[] = "$Id: _cdio_linux.c,v 1.15 2003/09/01 02:02:03 rocky Exp $";
|
static const char _rcsid[] = "$Id: _cdio_linux.c,v 1.16 2003/09/01 15:11:36 rocky Exp $";
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
@@ -328,10 +328,10 @@ __read_packet_mode2_sectors (int fd, void *buf, lba_t lba,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
_read_packet_mode2_sectors (int fd, void *buf, lba_t lba, unsigned nblocks,
|
_read_packet_mode2_sectors (int fd, void *buf, lba_t lba,
|
||||||
bool use_read_10)
|
unsigned int nblocks, bool use_read_10)
|
||||||
{
|
{
|
||||||
unsigned l = 0;
|
unsigned int l = 0;
|
||||||
int retval = 0;
|
int retval = 0;
|
||||||
|
|
||||||
while (nblocks > 0)
|
while (nblocks > 0)
|
||||||
@@ -482,7 +482,7 @@ _cdio_read_audio_sector (void *user_data, void *data, lsn_t lsn)
|
|||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
_cdio_read_mode2_sectors (void *user_data, void *data, lsn_t lsn,
|
_cdio_read_mode2_sectors (void *user_data, void *data, lsn_t lsn,
|
||||||
bool mode2_form2, unsigned nblocks)
|
bool mode2_form2, unsigned int nblocks)
|
||||||
{
|
{
|
||||||
_img_private_t *_obj = user_data;
|
_img_private_t *_obj = user_data;
|
||||||
int i;
|
int i;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
$Id: _cdio_sunos.c,v 1.14 2003/07/27 22:52:22 rocky Exp $
|
$Id: _cdio_sunos.c,v 1.15 2003/09/01 15:11:36 rocky Exp $
|
||||||
|
|
||||||
Copyright (C) 2001 Herbert Valerio Riedel <hvr@gnu.org>
|
Copyright (C) 2001 Herbert Valerio Riedel <hvr@gnu.org>
|
||||||
Copyright (C) 2002,2003 Rocky Bernstein <rocky@panix.com>
|
Copyright (C) 2002,2003 Rocky Bernstein <rocky@panix.com>
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
|
|
||||||
#ifdef HAVE_SOLARIS_CDROM
|
#ifdef HAVE_SOLARIS_CDROM
|
||||||
|
|
||||||
static const char _rcsid[] = "$Id: _cdio_sunos.c,v 1.14 2003/07/27 22:52:22 rocky Exp $";
|
static const char _rcsid[] = "$Id: _cdio_sunos.c,v 1.15 2003/09/01 15:11:36 rocky Exp $";
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@@ -340,7 +340,7 @@ _cdio_read_audio_sector (void *user_data, void *data, lsn_t lsn)
|
|||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
_cdio_read_mode2_sectors (void *user_data, void *data, uint32_t lsn,
|
_cdio_read_mode2_sectors (void *user_data, void *data, uint32_t lsn,
|
||||||
bool mode2_form2, unsigned nblocks)
|
bool mode2_form2, unsigned int nblocks)
|
||||||
{
|
{
|
||||||
_img_private_t *_obj = user_data;
|
_img_private_t *_obj = user_data;
|
||||||
int i;
|
int i;
|
||||||
@@ -460,6 +460,7 @@ _cdio_read_toc (_img_private_t *_obj)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_obj->gen.toc_init = true;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user