Towards getting an AIX driver working.

This commit is contained in:
rocky
2004-12-15 01:45:15 +00:00
parent 5f76506751
commit 5cfd029197
5 changed files with 1107 additions and 8 deletions

View File

@@ -19,7 +19,7 @@ define(RELEASE_NUM, 72)
define(CDIO_VERSION_STR, 0.$1cvs)
AC_PREREQ(2.52)
AC_REVISION([$Id: configure.ac,v 1.117 2004/12/09 01:03:29 rocky Exp $])dnl
AC_REVISION([$Id: configure.ac,v 1.118 2004/12/15 01:45:15 rocky Exp $])dnl
AC_INIT(libcdio, CDIO_VERSION_STR(RELEASE_NUM))
AC_CONFIG_SRCDIR(src/cd-info.c)
AM_INIT_AUTOMAKE
@@ -243,6 +243,11 @@ AC_SUBST(LIBCDIO_LIBS)
AC_SUBST(LIBISO9660_LIBS)
case $host_os in
aix*)
AC_DEFINE([HAVE_AIX_CDROM], [1],
[Define 1 if you have AIX CD-ROM support])
cd_drivers="${cd_drivers}, AIX"
;;
darwin6*|darwin7*)
AC_CHECK_HEADERS(IOKit/IOKitLib.h CoreFoundation/CFBase.h,
[have_iokit_h="yes"])

View File

@@ -1,5 +1,5 @@
/* -*- c -*-
$Id: cdio.h,v 1.66 2004/10/24 23:42:39 rocky Exp $
$Id: cdio.h,v 1.67 2004/12/15 01:45:15 rocky Exp $
Copyright (C) 2001 Herbert Valerio Riedel <hvr@gnu.org>
Copyright (C) 2003, 2004 Rocky Bernstein <rocky@panix.com>
@@ -30,7 +30,7 @@
/** Application Interface or Protocol version number. If the public
* interface changes, we increase this number.
*/
#define CDIO_API_VERSION 2
#define CDIO_API_VERSION 3
#include <cdio/version.h>
@@ -91,6 +91,7 @@ extern "C" {
typedef enum {
DRIVER_UNKNOWN, /**< Used as input when we don't care what kind
of driver to use. */
DRIVER_AIX, /**< AIX driver */
DRIVER_BSDI, /**< BSDI driver */
DRIVER_FREEBSD, /**< FreeBSD driver - includes CAM and ioctl access */
DRIVER_LINUX, /**< GNU/Linux Driver */
@@ -120,7 +121,7 @@ extern "C" {
enumeration in driver_id_t. Since we have a bogus (but useful) 0th
entry above we don't have to add one.
*/
#define CDIO_MIN_DRIVER DRIVER_BSDI
#define CDIO_MIN_DRIVER DRIVER_AIX
#define CDIO_MIN_DEVICE_DRIVER CDIO_MIN_DRIVER
#define CDIO_MAX_DRIVER DRIVER_NRG
#define CDIO_MAX_DEVICE_DRIVER DRIVER_WIN32
@@ -551,6 +552,9 @@ extern "C" {
/* True if xxx driver is available. where xxx=linux, solaris, nrg, ...
*/
/*! True if AIX driver is available. */
bool cdio_have_aix (void);
/*! True if BSDI driver is available. */
bool cdio_have_bsdi (void);
@@ -680,6 +684,57 @@ extern "C" {
*/
CdIo * cdio_open_cue (const char *cue_name);
/*! Set up CD-ROM for reading using the AIX driver. The device_name is
the some sort of device name.
@return the cdio object for subsequent operations.
NULL on error or there is no BSDI driver.
@see cdio_open
*/
CdIo * cdio_open_am_aix (const char *psz_source_name,
const char *psz_access_mode);
/*! Set up CD-ROM for reading using the AIX driver. The device_name is
the some sort of device name.
@return the cdio object for subsequent operations.
NULL on error or there is no BSDI driver.
@see cdio_open
*/
CdIo * cdio_open_aix (const char *psz_source_name);
/*! Return a string containing the default device name that the
BSDI driver would use when none is specified.
@return the cdio object for subsequent operations.
NULL on error or there is no AIX driver.
@see cdio_open_cd, cdio_open
*/
char * cdio_get_default_device_aix(void);
/*! Return a list of all of the CD-ROM devices that the AIX driver
can find.
In some situations of drivers or OS's we can't find a CD device if
there is no media in it and it is possible for this routine to return
NULL even though there may be a hardware CD-ROM.
*/
char **cdio_get_devices_aix(void);
/*! Set up CD-ROM for reading using the BSDI driver. The device_name is
the some sort of device name.
@return the cdio object for subsequent operations.
NULL on error or there is no BSDI driver.
@see cdio_open
*/
CdIo * cdio_open_am_bsdi (const char *psz_source_name,
const char *psz_access_mode);
/*! Set up CD-ROM for reading using the BSDI driver. The device_name is
the some sort of device name.

View File

@@ -1,4 +1,4 @@
# $Id: Makefile.am,v 1.63 2004/12/04 05:20:35 rocky Exp $
# $Id: Makefile.am,v 1.64 2004/12/15 01:45:15 rocky Exp $
#
# Copyright (C) 2003, 2004 Rocky Bernstein <rocky@panix.com>
#
@@ -56,6 +56,7 @@ EXTRA_DIST = image/Makefile FreeBSD/Makefile MSWindows/Makefile \
noinst_HEADERS = cdio_assert.h cdio_private.h portable.h
libcdio_sources = \
_cdio_aix.c \
_cdio_bsdi.c \
_cdio_generic.c \
_cdio_linux.c \

1023
lib/_cdio_aix.c Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,5 @@
/*
$Id: cdio.c,v 1.76 2004/12/04 11:50:40 rocky Exp $
$Id: cdio.c,v 1.77 2004/12/15 01:45:15 rocky Exp $
Copyright (C) 2003, 2004 Rocky Bernstein <rocky@panix.com>
Copyright (C) 2001 Herbert Valerio Riedel <hvr@gnu.org>
@@ -39,7 +39,7 @@
#include <cdio/logging.h>
#include "cdio_private.h"
static const char _rcsid[] = "$Id: cdio.c,v 1.76 2004/12/04 11:50:40 rocky Exp $";
static const char _rcsid[] = "$Id: cdio.c,v 1.77 2004/12/15 01:45:15 rocky Exp $";
const char *track_format2str[6] =
@@ -79,7 +79,9 @@ CdIo_driver_t CdIo_driver[CDIO_MAX_DRIVER] = { {0} };
#define CDIO_DRIVER_UNINIT -1
int CdIo_last_driver = CDIO_DRIVER_UNINIT;
#ifdef HAVE_BSDI_CDROM
#ifdef HAVE_AIX_CDROM
const driver_id_t cdio_os_driver = DRIVER_AIX;
#elif HAVE_BSDI_CDROM
const driver_id_t cdio_os_driver = DRIVER_BSDI;
#elif HAVE_FREEBSD_CDROM
const driver_id_t cdio_os_driver = DRIVER_FREEBSD;
@@ -117,6 +119,18 @@ CdIo_driver_t CdIo_all_drivers[CDIO_MAX_DRIVER+1] = {
NULL
},
{DRIVER_BSDI,
CDIO_SRC_IS_DEVICE_MASK|CDIO_SRC_IS_NATIVE_MASK|CDIO_SRC_IS_SCSI_MASK,
"AIX",
"AIX SCSI driver",
&cdio_have_aix,
&cdio_open_aix,
&cdio_open_am_aix,
&cdio_get_default_device_aix,
&cdio_is_device_generic,
&cdio_get_devices_aix
},
{DRIVER_BSDI,
CDIO_SRC_IS_DEVICE_MASK|CDIO_SRC_IS_NATIVE_MASK|CDIO_SRC_IS_SCSI_MASK,
"BSDI",
@@ -1053,6 +1067,7 @@ cdio_open_am (const char *psz_orig_source, driver_id_t driver_id,
return ret;
}
break;
case DRIVER_AIX:
case DRIVER_BSDI:
case DRIVER_FREEBSD:
case DRIVER_LINUX: