diff --git a/lib/_cdio_sunos.c b/lib/_cdio_sunos.c index 7262ca37..a768afd6 100644 --- a/lib/_cdio_sunos.c +++ b/lib/_cdio_sunos.c @@ -1,5 +1,5 @@ /* - $Id: _cdio_sunos.c,v 1.19 2003/09/27 23:29:29 rocky Exp $ + $Id: _cdio_sunos.c,v 1.20 2003/10/03 02:35:33 rocky Exp $ Copyright (C) 2001 Herbert Valerio Riedel Copyright (C) 2002,2003 Rocky Bernstein @@ -23,7 +23,13 @@ # include "config.h" #endif +#ifdef HAVE_STRING_H #include +#endif +#ifdef HAVE_GLOB_H +#include +#endif + #include #include @@ -36,7 +42,7 @@ #ifdef HAVE_SOLARIS_CDROM -static const char _rcsid[] = "$Id: _cdio_sunos.c,v 1.19 2003/09/27 23:29:29 rocky Exp $"; +static const char _rcsid[] = "$Id: _cdio_sunos.c,v 1.20 2003/10/03 02:35:33 rocky Exp $"; #include #include @@ -508,6 +514,34 @@ cdio_get_default_device_solaris(void) return strdup(DEFAULT_CDIO_DEVICE); } +/*! + Return an array of strings giving possible CD devices. + */ +char ** +cdio_get_devices_solaris (void) +{ +#ifndef HAVE_SOLARIS_CDROM + return NULL; +#else + char **drives = NULL; + unsigned int num_files=0; +#ifdef HAVE_GLOB_H + unsigned int i; + glob_t globbuf; + globbuf.gl_offs = 0; + glob("/vol/dev/aliases/cdrom*", GLOB_DOOFFS, NULL, &globbuf); + for (i=0; i