From owner-freebsd-hackers Thu Dec 2 1:25:44 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from alpo.whistle.com (alpo.whistle.com [207.76.204.38]) by hub.freebsd.org (Postfix) with ESMTP id 03EFB14D63; Thu, 2 Dec 1999 01:25:38 -0800 (PST) (envelope-from julian@whistle.com) Received: from current1.whiste.com (current1.whistle.com [207.76.205.22]) by alpo.whistle.com (8.9.1a/8.9.1) with ESMTP id BAA47348; Thu, 2 Dec 1999 01:24:08 -0800 (PST) Date: Thu, 2 Dec 1999 01:24:07 -0800 (PST) From: Julian Elischer To: Alfred Perlstein Cc: Reinier Bezuidenhout , 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: 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 The structures are identical because they are what the SCSI spec specifies that's what they look like.. On Thu, 2 Dec 1999, Alfred Perlstein wrote: > 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 > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message