From 9caecaf01c6c6a15912b9e9f6f31e957d4f124ed Mon Sep 17 00:00:00 2001 From: downsj Date: Fri, 7 Aug 1998 08:45:03 +0000 Subject: [PATCH] Make the eject button in workman actually, well, work. (People test the things they add to ports, right?) --- audio/workman/patches/patch-ac | 39 ++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 audio/workman/patches/patch-ac diff --git a/audio/workman/patches/patch-ac b/audio/workman/patches/patch-ac new file mode 100644 index 00000000000..ce419846f9d --- /dev/null +++ b/audio/workman/patches/patch-ac @@ -0,0 +1,39 @@ +*** plat_freebsd.c.old Fri Aug 7 01:35:19 1998 +--- plat_freebsd.c Fri Aug 7 01:41:00 1998 +*************** +*** 355,368 **** + if (fstatfs(stbuf.st_rdev, &buf) == 0) + return (-3); + +! #if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) + rval = ioctl(d->fd, CDIOCALLOW); + if (rval == 0) + #endif + rval = ioctl(d->fd, CDIOCEJECT); +! #if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) + if (rval == 0) + rval = ioctl(d->fd, CDIOCPREVENT); + #endif + return rval; + } +--- 355,374 ---- + if (fstatfs(stbuf.st_rdev, &buf) == 0) + return (-3); + +! #if defined(__NetBSD__) || defined(__FreeBSD__) + rval = ioctl(d->fd, CDIOCALLOW); + if (rval == 0) + #endif + rval = ioctl(d->fd, CDIOCEJECT); +! #if defined(__NetBSD__) || defined(__FreeBSD__) + if (rval == 0) + rval = ioctl(d->fd, CDIOCPREVENT); ++ #endif ++ #if defined(__OpenBSD__) ++ if (rval == 0) { ++ (void) close(d->fd); ++ d->fd = -1; ++ } + #endif + return rval; + }