Small fixes.
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
$Id: logging.h,v 1.7 2004/05/05 01:50:46 rocky Exp $
|
$Id: logging.h,v 1.8 2004/05/05 02:47:18 rocky Exp $
|
||||||
|
|
||||||
Copyright (C) 2000, Herbert Valerio Riedel <hvr@gnu.org>
|
Copyright (C) 2000, Herbert Valerio Riedel <hvr@gnu.org>
|
||||||
Copyright (C) 2003, Rocky Bernstein <rocky@panix.com>
|
Copyright (C) 2003, Rocky Bernstein <rocky@panix.com>
|
||||||
@@ -111,7 +111,7 @@ void cdio_info (const char format[], ...) GNUC_PRINTF(1,2);
|
|||||||
void cdio_warn (const char format[], ...) GNUC_PRINTF(1,2);
|
void cdio_warn (const char format[], ...) GNUC_PRINTF(1,2);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle an error message. Execution is terminated
|
* Handle an error message. Execution is terminated.
|
||||||
*
|
*
|
||||||
* @see cdio_log for a more generic routine.
|
* @see cdio_log for a more generic routine.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
$Id: freebsd.h,v 1.2 2004/04/30 21:36:54 rocky Exp $
|
$Id: freebsd.h,v 1.3 2004/05/05 02:47:18 rocky Exp $
|
||||||
|
|
||||||
Copyright (C) 2003, 2004 Rocky Bernstein <rocky@panix.com>
|
Copyright (C) 2003, 2004 Rocky Bernstein <rocky@panix.com>
|
||||||
|
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
#include "cdio_private.h"
|
#include "cdio_private.h"
|
||||||
|
|
||||||
/* Is this the right default? */
|
/* Is this the right default? */
|
||||||
#define DEFAULT_CDIO_DEVICE "/dev/acd0c"
|
#define DEFAULT_CDIO_DEVICE "/dev/cd0c"
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
$Id: freebsd_cam.c,v 1.3 2004/05/05 02:39:16 rocky Exp $
|
$Id: freebsd_cam.c,v 1.4 2004/05/05 02:47:18 rocky Exp $
|
||||||
|
|
||||||
Copyright (C) 2004 Rocky Bernstein <rocky@panix.com>
|
Copyright (C) 2004 Rocky Bernstein <rocky@panix.com>
|
||||||
|
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
# include "config.h"
|
# include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static const char _rcsid[] = "$Id: freebsd_cam.c,v 1.3 2004/05/05 02:39:16 rocky Exp $";
|
static const char _rcsid[] = "$Id: freebsd_cam.c,v 1.4 2004/05/05 02:47:18 rocky Exp $";
|
||||||
|
|
||||||
#ifdef HAVE_FREEBSD_CDROM
|
#ifdef HAVE_FREEBSD_CDROM
|
||||||
|
|
||||||
@@ -172,7 +172,7 @@ read_mode2_sectors_freebsd_cam (_img_private_t *_obj, void *buf, uint32_t lba,
|
|||||||
cam_fill_csio (&(_obj->ccb.csio), 1, NULL,
|
cam_fill_csio (&(_obj->ccb.csio), 1, NULL,
|
||||||
CAM_DEV_QFRZDIS, MSG_SIMPLE_Q_TAG, NULL, 0,
|
CAM_DEV_QFRZDIS, MSG_SIMPLE_Q_TAG, NULL, 0,
|
||||||
sizeof(_obj->ccb.csio.sense_data), 0, 30*1000);
|
sizeof(_obj->ccb.csio.sense_data), 0, 30*1000);
|
||||||
_obj->ccb.csio.cdb_len = (8)+1;
|
_obj->ccb.csio.cdb_len = (b_read_10 ? 8 : 9) + 1;
|
||||||
|
|
||||||
CDIO_MMC_SET_COMMAND(_obj->ccb.csio.cdb_io.cdb_bytes, b_read_10
|
CDIO_MMC_SET_COMMAND(_obj->ccb.csio.cdb_io.cdb_bytes, b_read_10
|
||||||
? CDIO_MMC_GPCMD_READ_10 : CDIO_MMC_GPCMD_READ_CD);
|
? CDIO_MMC_GPCMD_READ_10 : CDIO_MMC_GPCMD_READ_CD);
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
$Id: _cdio_linux.c,v 1.42 2004/05/04 01:57:23 rocky Exp $
|
$Id: _cdio_linux.c,v 1.43 2004/05/05 02:47:18 rocky Exp $
|
||||||
|
|
||||||
Copyright (C) 2001 Herbert Valerio Riedel <hvr@gnu.org>
|
Copyright (C) 2001 Herbert Valerio Riedel <hvr@gnu.org>
|
||||||
Copyright (C) 2002, 2003, 2004 Rocky Bernstein <rocky@panix.com>
|
Copyright (C) 2002, 2003, 2004 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.42 2004/05/04 01:57:23 rocky Exp $";
|
static const char _rcsid[] = "$Id: _cdio_linux.c,v 1.43 2004/05/05 02:47:18 rocky Exp $";
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
@@ -300,24 +300,22 @@ _read_audio_sectors_linux (void *env, void *buf, lsn_t lsn,
|
|||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
_read_packet_mode2_sectors_mmc (int fd, void *buf, lba_t lba,
|
_read_packet_mode2_sectors_mmc (int fd, void *buf, lba_t lba,
|
||||||
unsigned int nblocks, bool use_read_10)
|
unsigned int nblocks, bool b_read_10)
|
||||||
{
|
{
|
||||||
struct cdrom_generic_command cgc;
|
struct cdrom_generic_command cgc;
|
||||||
|
|
||||||
memset (&cgc, 0, sizeof (struct cdrom_generic_command));
|
memset (&cgc, 0, sizeof (struct cdrom_generic_command));
|
||||||
|
|
||||||
CDIO_MMC_SET_COMMAND(cgc.cmd,
|
CDIO_MMC_SET_COMMAND(cgc.cmd, b_read_10
|
||||||
use_read_10 ? GPCMD_READ_10 : CDIO_MMC_GPCMD_READ_CD);
|
? CDIO_MMC_GPCMD_READ_10 : CDIO_MMC_GPCMD_READ_CD);
|
||||||
|
|
||||||
CDIO_MMC_SET_READ_LBA(cgc.cmd, lba);
|
CDIO_MMC_SET_READ_LBA(cgc.cmd, lba);
|
||||||
CDIO_MMC_SET_READ_LENGTH(cgc.cmd, nblocks);
|
CDIO_MMC_SET_READ_LENGTH(cgc.cmd, nblocks);
|
||||||
|
|
||||||
if (!use_read_10)
|
if (!b_read_10) {
|
||||||
{
|
cgc.cmd[1] = 0; /* sector size mode2 */
|
||||||
cgc.cmd[1] = 0; /* sector size mode2 */
|
cgc.cmd[9] = 0x58; /* 2336 mode2 */
|
||||||
|
}
|
||||||
cgc.cmd[9] = 0x58; /* 2336 mode2 */
|
|
||||||
}
|
|
||||||
|
|
||||||
cgc.buflen = M2RAW_SECTOR_SIZE * nblocks;
|
cgc.buflen = M2RAW_SECTOR_SIZE * nblocks;
|
||||||
cgc.buffer = buf;
|
cgc.buffer = buf;
|
||||||
@@ -327,7 +325,7 @@ _read_packet_mode2_sectors_mmc (int fd, void *buf, lba_t lba,
|
|||||||
#endif
|
#endif
|
||||||
cgc.data_direction = CGC_DATA_READ;
|
cgc.data_direction = CGC_DATA_READ;
|
||||||
|
|
||||||
if (use_read_10)
|
if (b_read_10)
|
||||||
{
|
{
|
||||||
int retval;
|
int retval;
|
||||||
|
|
||||||
@@ -351,7 +349,7 @@ _read_packet_mode2_sectors_mmc (int fd, void *buf, lba_t lba,
|
|||||||
|
|
||||||
static int
|
static int
|
||||||
_read_packet_mode2_sectors (int fd, void *buf, lba_t lba,
|
_read_packet_mode2_sectors (int fd, void *buf, lba_t lba,
|
||||||
unsigned int nblocks, bool use_read_10)
|
unsigned int nblocks, bool b_read_10)
|
||||||
{
|
{
|
||||||
unsigned int l = 0;
|
unsigned int l = 0;
|
||||||
int retval = 0;
|
int retval = 0;
|
||||||
@@ -362,7 +360,7 @@ _read_packet_mode2_sectors (int fd, void *buf, lba_t lba,
|
|||||||
void *buf2 = ((char *)buf ) + (l * M2RAW_SECTOR_SIZE);
|
void *buf2 = ((char *)buf ) + (l * M2RAW_SECTOR_SIZE);
|
||||||
|
|
||||||
retval |= _read_packet_mode2_sectors_mmc (fd, buf2, lba + l, nblocks2,
|
retval |= _read_packet_mode2_sectors_mmc (fd, buf2, lba + l, nblocks2,
|
||||||
use_read_10);
|
b_read_10);
|
||||||
|
|
||||||
if (retval)
|
if (retval)
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user