summaryrefslogtreecommitdiffstats
path: root/kscd/libwm/plat_sun.c
diff options
context:
space:
mode:
Diffstat (limited to 'kscd/libwm/plat_sun.c')
-rw-r--r--kscd/libwm/plat_sun.c48
1 files changed, 32 insertions, 16 deletions
diff --git a/kscd/libwm/plat_sun.c b/kscd/libwm/plat_sun.c
index 824da881..d891859c 100644
--- a/kscd/libwm/plat_sun.c
+++ b/kscd/libwm/plat_sun.c
@@ -36,7 +36,7 @@ static char plat_sun_id[] = "$Id$";
#include <string.h>
#include <sys/param.h>
#include <sys/stat.h>
-#include <sys/statfs.h>
+#include <sys/statvfs.h>
#include <sys/time.h>
#include <sys/ioctl.h>
@@ -44,6 +44,7 @@ static char plat_sun_id[] = "$Id$";
#include "include/wm_helpers.h"
#include "include/wm_cdrom.h"
#include "include/wm_cdtext.h"
+#include "include/wm_scsi.h"
#include <unistd.h>
#include <signal.h>
@@ -237,14 +238,16 @@ wmcd_open( struct wm_drive *d )
*/
#if defined(BUILD_CDDA)
if(d->cdda) {
- if (!gen_cdda_init(d))
+ if (!gen_cdda_init(d)) {
/* WARNING: Old GUI call. How could this survive? */
- enable_cdda_controls(1);
- else {
+ /* FIXME: undeclared function */
+ /* enable_cdda_controls(1); */
+ } else {
wm_lib_message(WM_MSG_LEVEL_DEBUG|WM_MSG_CLASS, "wmcd_open(): failed in gen_cdda_init\n");
gen_close(d);
return -1;
}
+ }
#endif
/* Can we figure out the drive type? */
@@ -602,7 +605,7 @@ int
gen_eject( struct wm_drive *d )
{
struct stat stbuf;
- struct statfs sfsbuf;
+ struct statvfs sfsbuf;
if (fstat(d->fd, &stbuf) != 0)
return (-2);
@@ -628,7 +631,8 @@ gen_eject( struct wm_drive *d )
if (d->cdda_slave > -1)
{
write(d->cdda_slave, "E", 1);
- cdda_get_ack(d->cdda_slave);
+ /* FIXME: undeclared */
+ /* cdda_get_ack(d->cdda_slave); */
}
}
@@ -699,7 +703,12 @@ gen_get_volume( struct wm_drive *d, int *left, int *right )
return (wm_scsi2_get_volume(d, left, right));
} /* gen_get_volume() */
-#ifdef BUILD_CDDA
+#if 0 /* def BUILD_CDDA */
+/* FIXME:
+ld: fatal: symbol 'gen_cdda_init' is multiply-defined:
+ (file kscd/libwm/libworkman.a(plat_sun.c.o) type=FUNC; file kscd/libwm/libworkman.a(cdda.c.o) type=FUNC);
+ld: fatal: file processing errors. No output written to kaudiocreator/kaudiocreator
+*/
/*
* Try to initialize the CDDA slave. Returns 0 on success.
@@ -727,10 +736,11 @@ gen_cdda_init( struct wm_drive *d )
close(slavefds[1]);
close(d->fd);
/* Try the default path first. */
- execl(cddaslave_path, cddaslave_path, d->cd_device, (void *)0);
+ /* FIXME: cddaslave_path is undeclared */
+ /* execl(cddaslave_path, cddaslave_path, d->cd_device, (void *)0); */
/* Search $PATH if that didn't work. */
execlp("cddaslave", "cddaslave", d->cd_device, (void *)0);
- perror(cddaslave_path);
+ /* perror(cddaslave_path); */
exit(1);
case -1:
@@ -743,12 +753,15 @@ gen_cdda_init( struct wm_drive *d )
close(slavefds[1]);
d->cdda_slave = slavefds[0];
+#if 0
+/* FIXME: undeclared */
if (!cdda_get_ack(d->cdda_slave))
{
d->cdda_slave = -1;
codec_start();
return (-3);
}
+#endif
return (0);
}
@@ -790,9 +803,9 @@ typedef int audio_device_t;
* Also, don't do anything real if it's not Solaris.
*/
#if !defined(AUDIO_ENCODING_LINEAR) || !defined(CODEC) || !defined(SYSV) /* { */
-codec_init() { return 0; }
-codec_start() { return 0; }
-codec_stop() { return 0; }
+int codec_init(void) { return 0; }
+int codec_start(void) { return 0; }
+int codec_stop(void) { return 0; }
#else
#ifndef AUDIO_INTERNAL_CD_IN
@@ -805,6 +818,7 @@ static int ctl_fd = -1;
static int port = AUDIO_LINE_IN;
int internal_audio = 1;
+int
codec_init( void )
{
int i;
@@ -873,9 +887,10 @@ codec_init( void )
foo.record.port = port;
foo.record.balance = foo.play.balance = AUDIO_MID_BALANCE;
#ifdef BUILD_CDDA
- if (d->cdda_slave > -1)
+/* FIXME: d is undeclared */
+/* if (d->cdda_slave > -1)
foo.monitor_gain = 0;
- else
+ else */
#endif
foo.monitor_gain = AUDIO_MAX_GAIN;
/*
@@ -893,7 +908,7 @@ codec_init( void )
return 0;
}
-static int
+int
kick_codec( void )
{
audio_info_t foo;
@@ -928,6 +943,7 @@ kick_codec( void )
return retval;
} /* kick_codec() */
+int
codec_start( void )
{
audio_info_t foo;
@@ -954,7 +970,7 @@ codec_start( void )
return 0;
} /* codec_start() */
-codec_stop( void ) { return 0; }
+int codec_stop( void ) { return 0; }
#endif /* CODEC } */