Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 Jan 1996 23:09:31 -0600
From:      "Daniel M. Eischen" <deischen@iworks.InterWorks.org>
To:        dglo@SSEC.WISC.EDU, questions@freebsd.org
Subject:   Re: CD interface
Message-ID:  <9601020509.AA02831@iworks.InterWorks.org>

Next in thread | Raw E-Mail | Index | Archive | Help

>> 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).
...
>Might this be an older version of xmcd that opens the device read
>only?  I think it was patched at some point to open it read/write.
>To use the generic scsi calls you need to open the device read/write.

That's how I made it work and am running it under 2.1-stable.  In the xmcd
distribution directory, change libdi.d/os_frbsd.c (the pthru_open function
) to open the device O_RDWR instead of O_RDONLY.

*** os_frbsd.c.old      Tue Jan  2 01:17:22 1996
--- os_frbsd.c  Tue Jan  2 01:17:55 1996
***************
*** 214,220 ****
                return FALSE;
        }
  
!       if ((pthru_fd = open(path, O_RDONLY)) < 0) {
                DBGPRN(errfp, "Cannot open %s: errno=%d\n", path, errno);
                return FALSE;
        }
--- 214,220 ----
                return FALSE;
        }
  
!       if ((pthru_fd = open(path, O_RDRW)) < 0) {
                DBGPRN(errfp, "Cannot open %s: errno=%d\n", path, errno);
                return FALSE;
        }

Dan Eischen
deischen@iworks.InterWorks.org



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?9601020509.AA02831>