Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 Jan 1996 22:30:21 -0500 (EST)
From:      Peter Berger <peterb@telerama.lm.com>
To:        Dave Glowacki <dglo@SSEC.WISC.EDU>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: CD interface
Message-ID:  <Pine.BSI.3.91.960101222632.15953A-100000@ivory.lm.com>
In-Reply-To: <199601012217.QAA19302@tick.SSEC.WISC.EDU>

next in thread | previous in thread | raw e-mail | index | archive | help

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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSI.3.91.960101222632.15953A-100000>