From owner-freebsd-hackers Thu Dec 2 0:18: 4 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from fw.wintelcom.net (ns1.wintelcom.net [209.1.153.20]) by hub.freebsd.org (Postfix) with ESMTP id 5F7F214DF2; Thu, 2 Dec 1999 00:17:58 -0800 (PST) (envelope-from bright@wintelcom.net) Received: from localhost (bright@localhost) by fw.wintelcom.net (8.9.3/8.9.3) with ESMTP id AAA11247; Thu, 2 Dec 1999 00:45:57 -0800 (PST) Date: Thu, 2 Dec 1999 00:45:57 -0800 (PST) From: Alfred Perlstein To: Reinier Bezuidenhout Cc: wilko@yedi.iaf.nl, groudier@club-internet.fr, FreeBSD-hackers@FreeBSD.ORG, marcel@FreeBSD.ORG Subject: Re: Linux ioctl not implemented error In-Reply-To: <199912020719.JAA02892@oskar.dev.nanoteq.co.za> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, 2 Dec 1999, Reinier Bezuidenhout wrote: > > @@ -1273,6 +1273,11 @@ > > return error; > > } > > > > + case LINUX_CDROMVOLREAD: { > > + args->arg = CDIOGETVOL; > > + return (ioctl(p, (struct ioctl_args *)args)); > > + } > > + > > case LINUX_OSS_GETVERSION: { > > int version; > > > > > > I've made a change that removed the complaint from vmware before Vladimar > fixed it in the kernel module. It is the implementation of LINUX_CDROMVOLREAD > to fit in with CDIOCGETVOL which has two different structures. > > Marcel please review this :) > > > Index: linux_ioctl.c > =================================================================== > RCS file: /home/freebsd-cvs/src/sys/i386/linux/linux_ioctl.c,v > retrieving revision 1.47 > diff -c -r1.47 linux_ioctl.c > *** linux_ioctl.c 1999/11/29 23:03:34 1.47 > --- linux_ioctl.c 1999/12/02 07:15:29 > *************** > *** 473,478 **** > --- 473,486 ---- > u_char cdte_datamode; > }; > > + struct linux_cdrom_volctrl > + { > + u_char channel0; > + u_char channel1; > + u_char channel2; > + u_char channel3; > + }; > + > struct linux_cdrom_subchnl > { > u_char cdsc_format; > *************** > *** 1232,1237 **** > --- 1240,1261 ---- > bsd_to_linux_msf_lba(irtse.address_format, > &irtse.entry.addr, <e.cdte_addr); > copyout((caddr_t)<e, (caddr_t)args->arg, sizeof(lte)); > + } > + return error; > + } > + > + case LINUX_CDROMVOLREAD: { > + struct linux_cdrom_volctrl lvol, *lvolp = > + (struct linux_cdrom_volctrl *)args->arg; > + struct ioc_vol bsd_vol; > + error = fo_ioctl(fp, CDIOCGETVOL, (caddr_t)&bsd_vol, p); > + if (!error) { > + lvol = *lvolp; > + lvol.channel0 = bsd_vol.vol[0]; > + lvol.channel1 = bsd_vol.vol[1]; > + lvol.channel2 = bsd_vol.vol[2]; > + lvol.channel3 = bsd_vol.vol[3]; > + copyout((caddr_t)&lvol, (caddr_t)args->arg, sizeof(lvol)); > } > return error; > } > FYI the kernel structures are completely identical, you don't really gain anything by doing this convertion. Should this be put in for clarity? I'm not sure. Marcel? -Alfred Perlstein - [bright@rush.net|alfred@freebsd.org] Wintelcom systems administrator and programmer - http://www.wintelcom.net/ [bright@wintelcom.net] To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message