Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 Dec 1999 09:19:13 +0200 (SAT)
From:      Reinier Bezuidenhout <rbezuide@oskar.dev.nanoteq.co.za>
To:        bright@wintelcom.net (Alfred Perlstein)
Cc:        wilko@yedi.iaf.nl, groudier@club-internet.fr, FreeBSD-hackers@FreeBSD.ORG, marcel@FreeBSD.ORG
Subject:   Re: Linux ioctl not implemented error
Message-ID:  <199912020719.JAA02892@oskar.dev.nanoteq.co.za>
In-Reply-To: <Pine.BSF.4.21.9912011156200.4557-100000@fw.wintelcom.net> from Alfred Perlstein at "Dec 1, 99 12:08:41 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
Hi ...

> > > > to do?
> > > 
> > > CDROMVOLREAD that you want to map to CDIOGETVOL.

That should read CDIOCGETVOL :)

> try this:
> 
> Index: linux_ioctl.c
> ===================================================================
> RCS file: /home/ncvs/src/sys/i386/linux/linux_ioctl.c,v
> retrieving revision 1.47
> diff -u -u -r1.47 linux_ioctl.c
> --- linux_ioctl.c	1999/11/29 23:03:34	1.47
> +++ linux_ioctl.c	1999/12/01 23:46:22
> @@ -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, &lte.cdte_addr);
  	    copyout((caddr_t)&lte, (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;
      }



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?199912020719.JAA02892>