From owner-freebsd-questions Mon Jan 1 21:13:07 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id VAA29585 for questions-outgoing; Mon, 1 Jan 1996 21:13:07 -0800 (PST) Received: from iworks.InterWorks.org (iworks.interworks.org [128.255.18.10]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id VAA29578 for ; Mon, 1 Jan 1996 21:13:03 -0800 (PST) Received: by iworks.InterWorks.org (1.37.109.8/16.2) id AA02831; Mon, 1 Jan 1996 23:09:31 -0600 Message-Id: <9601020509.AA02831@iworks.InterWorks.org> Date: Mon, 1 Jan 1996 23:09:31 -0600 From: "Daniel M. Eischen" To: dglo@SSEC.WISC.EDU, questions@freebsd.org Subject: Re: CD interface Sender: owner-questions@freebsd.org Precedence: bulk >> 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