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 [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to