Add cdio_open_am to allow specifying an access method use for
reading/controlling CD.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
$Id: _cdio_freebsd.c,v 1.24 2004/04/26 07:54:47 rocky Exp $
|
||||
$Id: _cdio_freebsd.c,v 1.25 2004/04/30 06:54:15 rocky Exp $
|
||||
|
||||
Copyright (C) 2003, 2004 Rocky Bernstein <rocky@panix.com>
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
static const char _rcsid[] = "$Id: _cdio_freebsd.c,v 1.24 2004/04/26 07:54:47 rocky Exp $";
|
||||
static const char _rcsid[] = "$Id: _cdio_freebsd.c,v 1.25 2004/04/30 06:54:15 rocky Exp $";
|
||||
|
||||
#include <cdio/sector.h>
|
||||
#include <cdio/util.h>
|
||||
@@ -60,16 +60,16 @@ static const char _rcsid[] = "$Id: _cdio_freebsd.c,v 1.24 2004/04/26 07:54:47 ro
|
||||
- _obj->tochdr.starting_track + 1)
|
||||
#define FIRST_TRACK_NUM (_obj->tochdr.starting_track)
|
||||
|
||||
typedef enum {
|
||||
_AM_NONE,
|
||||
_AM_IOCTL,
|
||||
} access_mode_t;
|
||||
|
||||
typedef struct {
|
||||
/* Things common to all drivers like this.
|
||||
This must be first. */
|
||||
generic_img_private_t gen;
|
||||
|
||||
enum {
|
||||
_AM_NONE,
|
||||
_AM_IOCTL,
|
||||
} access_mode;
|
||||
|
||||
char *source_name;
|
||||
|
||||
bool init;
|
||||
@@ -541,6 +541,21 @@ cdio_get_default_device_freebsd()
|
||||
return strdup(DEFAULT_CDIO_DEVICE);
|
||||
}
|
||||
|
||||
/*!
|
||||
Initialization routine. This is the only thing that doesn't
|
||||
get called via a function pointer. In fact *we* are the
|
||||
ones to set that up.
|
||||
*/
|
||||
CdIo *
|
||||
cdio_open_am_freebsd (const char *psz_source_name, const char *psz_access_mode)
|
||||
{
|
||||
if (psz_access_mode != NULL)
|
||||
cdio_warn ("there is only one access mode for freebsd. Arg %s ignored",
|
||||
psz_access_mode);
|
||||
return cdio_open_freebsd(psz_source_name);
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
Initialization routine. This is the only thing that doesn't
|
||||
get called via a function pointer. In fact *we* are the
|
||||
|
||||
Reference in New Issue
Block a user