FreeBSD fixes.
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
$Id: freebsd.c,v 1.16 2005/02/06 11:13:37 rocky Exp $
|
$Id: freebsd.c,v 1.17 2005/02/06 13:05:42 rocky Exp $
|
||||||
|
|
||||||
Copyright (C) 2003, 2004, 2005 Rocky Bernstein <rocky@panix.com>
|
Copyright (C) 2003, 2004, 2005 Rocky Bernstein <rocky@panix.com>
|
||||||
|
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
# include "config.h"
|
# include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static const char _rcsid[] = "$Id: freebsd.c,v 1.16 2005/02/06 11:13:37 rocky Exp $";
|
static const char _rcsid[] = "$Id: freebsd.c,v 1.17 2005/02/06 13:05:42 rocky Exp $";
|
||||||
|
|
||||||
#include "freebsd.h"
|
#include "freebsd.h"
|
||||||
|
|
||||||
@@ -344,14 +344,14 @@ get_drive_cap_freebsd (const void *p_user_data,
|
|||||||
*/
|
*/
|
||||||
static driver_return_code_t
|
static driver_return_code_t
|
||||||
run_mmc_cmd_freebsd( void *p_user_data, unsigned int i_timeout_ms,
|
run_mmc_cmd_freebsd( void *p_user_data, unsigned int i_timeout_ms,
|
||||||
unsigned int i_cdb, const mmc_cdb_t *p_cdb,
|
unsigned int i_cdb, const scsi_mmc_cdb_t *p_cdb,
|
||||||
mmc_direction_t e_direction,
|
scsi_mmc_direction_t e_direction,
|
||||||
unsigned int i_buf, /*in/out*/ void *p_buf )
|
unsigned int i_buf, /*in/out*/ void *p_buf )
|
||||||
{
|
{
|
||||||
const _img_private_t *p_env = p_user_data;
|
const _img_private_t *p_env = p_user_data;
|
||||||
|
|
||||||
if (p_env->access_mode == _AM_CAM)
|
if (p_env->access_mode == _AM_CAM)
|
||||||
return run_scsi_cmd_freebsd_cam( p_user_data, i_timeout_ms, i_cdb, p_cdb,
|
return run_mmc_cmd_freebsd_cam( p_user_data, i_timeout_ms, i_cdb, p_cdb,
|
||||||
e_direction, i_buf, p_buf );
|
e_direction, i_buf, p_buf );
|
||||||
else
|
else
|
||||||
return DRIVER_OP_UNSUPPORTED;
|
return DRIVER_OP_UNSUPPORTED;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
$Id: freebsd.h,v 1.2 2005/01/27 04:00:48 rocky Exp $
|
$Id: freebsd.h,v 1.3 2005/02/06 13:05:42 rocky Exp $
|
||||||
|
|
||||||
Copyright (C) 2003, 2004 Rocky Bernstein <rocky@panix.com>
|
Copyright (C) 2003, 2004 Rocky Bernstein <rocky@panix.com>
|
||||||
|
|
||||||
@@ -212,13 +212,13 @@ bool read_toc_freebsd_ioctl (_img_private_t *env);
|
|||||||
|
|
||||||
Return 0 if no error.
|
Return 0 if no error.
|
||||||
*/
|
*/
|
||||||
int run_scsi_cmd_freebsd_cam( const void *p_user_data,
|
int run_mmc_cmd_freebsd_cam( const void *p_user_data,
|
||||||
unsigned int i_timeout_ms,
|
unsigned int i_timeout_ms,
|
||||||
unsigned int i_cdb,
|
unsigned int i_cdb,
|
||||||
const scsi_mmc_cdb_t *p_cdb,
|
const scsi_mmc_cdb_t *p_cdb,
|
||||||
scsi_mmc_direction_t e_direction,
|
scsi_mmc_direction_t e_direction,
|
||||||
unsigned int i_buf,
|
unsigned int i_buf,
|
||||||
/*in/out*/ void *p_buf );
|
/*in/out*/ void *p_buf );
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
Return the size of the CD in logical block address (LBA) units.
|
Return the size of the CD in logical block address (LBA) units.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
$Id: freebsd_cam.c,v 1.5 2005/02/06 11:13:37 rocky Exp $
|
$Id: freebsd_cam.c,v 1.6 2005/02/06 13:05:42 rocky Exp $
|
||||||
|
|
||||||
Copyright (C) 2004, 2005 Rocky Bernstein <rocky@panix.com>
|
Copyright (C) 2004, 2005 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.5 2005/02/06 11:13:37 rocky Exp $";
|
static const char _rcsid[] = "$Id: freebsd_cam.c,v 1.6 2005/02/06 13:05:42 rocky Exp $";
|
||||||
|
|
||||||
#ifdef HAVE_FREEBSD_CDROM
|
#ifdef HAVE_FREEBSD_CDROM
|
||||||
|
|
||||||
@@ -227,7 +227,7 @@ int
|
|||||||
eject_media_freebsd_cam (_img_private_t *p_env)
|
eject_media_freebsd_cam (_img_private_t *p_env)
|
||||||
{
|
{
|
||||||
int i_status;
|
int i_status;
|
||||||
mmc_cdb_t cdb = {{0, }};
|
scsi_mmc_cdb_t cdb = {{0, }};
|
||||||
uint8_t buf[1];
|
uint8_t buf[1];
|
||||||
|
|
||||||
CDIO_MMC_SET_COMMAND(cdb.field, CDIO_MMC_GPCMD_ALLOW_MEDIUM_REMOVAL);
|
CDIO_MMC_SET_COMMAND(cdb.field, CDIO_MMC_GPCMD_ALLOW_MEDIUM_REMOVAL);
|
||||||
|
|||||||
Reference in New Issue
Block a user