Date: Thu, 2 Dec 1999 01:24:07 -0800 (PST) From: Julian Elischer <julian@whistle.com> To: Alfred Perlstein <bright@wintelcom.net> Cc: Reinier Bezuidenhout <rbezuide@oskar.dev.nanoteq.co.za>, wilko@yedi.iaf.nl, groudier@club-internet.fr, FreeBSD-hackers@FreeBSD.ORG, marcel@FreeBSD.ORG Subject: Re: Linux ioctl not implemented error Message-ID: <Pine.BSF.4.10.9912020123280.11862-100000@current1.whistle.com> In-Reply-To: <Pine.BSF.4.21.9912020043190.4557-100000@fw.wintelcom.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.10.9912020123280.11862-100000>