From owner-freebsd-questions Mon Jan 1 19:30:26 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id TAA25039 for questions-outgoing; Mon, 1 Jan 1996 19:30:26 -0800 (PST) Received: from ivory.lm.com (ivory.lm.com [192.231.221.9]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id TAA25033 for ; Mon, 1 Jan 1996 19:30:22 -0800 (PST) Received: (from peterb@localhost) by ivory.lm.com (8.6.12/8.6.12) id WAA16166; Mon, 1 Jan 1996 22:30:22 -0500 Date: Mon, 1 Jan 1996 22:30:21 -0500 (EST) From: Peter Berger X-Sender: peterb@ivory.lm.com To: Dave Glowacki cc: freebsd-questions@freebsd.org Subject: Re: CD interface In-Reply-To: <199601012217.QAA19302@tick.SSEC.WISC.EDU> Message-ID: X-Mentos: The Freshmaker! X-Request-Do: resolve MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-questions@freebsd.org Precedence: bulk This is a bug in either the documentation for ioctl or the scsi driver. The documentation does not indicate that EACCESS is a valid return value for ioctl. My hackaround was this: at line 263 of /sys/scsi/scsi_ioctl.c, add an #ifndef.... #ifndef XMCDKLUDGE if (cmd != SCIOCIDENTIFY && !(flags & FWRITE)) return EACCES; #endif /* XMCDKLUDGE */ and, obviously include options XMCDKLUDGE in your kernel config file. The "correct" way to fix this is not to hack the kernel but to recompile xmcd so that it doesn't mount the cd read-only; but I don't have motif sources so that's not an option. Note that the xmcd package -WILL NOT WORK ON 2.1 SYSTEMS- as distributed, because of this. Why is scsi_ioctl.c returning EACCESS in this case? Is there a rationale for it? It just seems like a check without a problem.... On Mon, 1 Jan 1996, Dave Glowacki wrote: > I'm trying to bring up xmcd on FreeBSD 2.1.0-RELEASE. By default, it tries > to use /dev/rcd0c to communicate with the drive, but that results in a > bunch of "SCIOCCOMMAND ioctl failed: Permission denied" messages (even when > running as root). > > According to the cd(4) man page: > > In addition the general scsi(4) ioctls may be used with the cd > driver, if used against the fourth (raw/whole disk) partiton. > (e.g. rcd0d) > > but after creating /dev/rsd0d with "mknod rcd0d c 15 3" and reconfiguring > xmcd, I get "Cannot open /dev/rcd0d: errno=6" > > Does anybody have this working with 2.1.0? > "The law locks up both man and woman/Who steals the goose from off the common But lets the greater felon loose/Who steals the common from the goose." -anon ------------------------------------------------------------------------------- Peter Berger - peterb@telerama.lm.com - http://www.lm.com/~peterb