From owner-freebsd-hackers Mon Jan 12 00:55:04 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.7/8.8.7) id AAA18814 for hackers-outgoing; Mon, 12 Jan 1998 00:55:04 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from konig.elte.hu (konig.elte.hu [157.181.6.22]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id AAA18744; Mon, 12 Jan 1998 00:54:43 -0800 (PST) (envelope-from sebesty@cs.elte.hu) Received: from neumann.cs.elte.hu (neumann [157.181.6.200]) by konig.elte.hu (8.8.3/8.7.3/7s) with ESMTP id JAA03547; Mon, 12 Jan 1998 09:33:15 +0100 Received: from localhost (sebesty@localhost) by neumann.cs.elte.hu (8.8.3/8.7.3/4c) with SMTP id JAA20594; Mon, 12 Jan 1998 09:32:36 +0100 X-Authentication-Warning: neumann.cs.elte.hu: sebesty owned process doing -bs Date: Mon, 12 Jan 1998 09:32:36 +0100 (MET) From: Zoltan Sebestyen To: FreeBSD questions mailinglist cc: FreeBSD hackers mailinglist Subject: Question about FreeBSD's CDROM handling capabilities Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk Hi, I've just examing the source code of kscd, a workman based CD player for the KDE project. In the FreeBSD/NetBSD dependent source file I found some 'ifdef' directives that are somewhat mysterious to me. They disable parts of the code that are supposed to work on FreeBSD(at least they work on my 2.2.2-RELEASE system, and they're even necessary for the player to work well!). Below I attached the parts of the code I mentioned. The lines starting with an exclamation mark (!) are still in the source code, but I think they should have to be removed. Please tell me if with the removal of these directives the code will be well functioning or not. *************** *** 243,254 **** } if (ioctl(d->fd, CDIOCREADSUBCHANNEL, &sc)) { ! #ifdef __NetBSD__ /* we need to release the device so the kernel will notice reloaded media */ (void) close(d->fd); d->fd = -1; ! #endif return (0); /* ejected */ } --- The next part --- *************** *** 398,407 **** msf.end_f = end % 75; /* According to Marc van Kempen FreeBSD doesn't have CDIOCSTART -- Bernd */ ! #ifndef __FreeBSD__ if (ioctl(d->fd, CDIOCSTART)) return (-1); ! #endif if (ioctl(d->fd, CDIOCPLAYMSF, &msf)) return (-2); *************** *** 427,441 **** if (fstatfs(stbuf.st_rdev, &buf) == 0) return (-3); ! #ifdef __NetBSD__ rval = ioctl(d->fd, CDIOCALLOW); if (rval == 0) ! #endif rval = ioctl(d->fd, CDIOCEJECT); ! #ifdef __NetBSD__ if (rval == 0) rval = ioctl(d->fd, CDIOCPREVENT); ! #endif return rval; } -------------------------------------------------------------------------------- Sebestyen Zoltan It all seems so stupid, it makes me want to give up. szoli@digo.inf..elte.hu But why should I give up, when it all seems so stupid? MAKE INSTALL NOT WAR