Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/compat/linux/common For the read subchannel ioctl, don't...



details:   https://anonhg.NetBSD.org/src/rev/b66c52387124
branches:  trunk
changeset: 503212:b66c52387124
user:      fvdl <fvdl%NetBSD.org@localhost>
date:      Sat Feb 03 01:17:38 2001 +0000

description:
For the read subchannel ioctl, don't mix up the data and address formats,
and always set the track to 0, like Linux does.

diffstat:

 sys/compat/linux/common/linux_cdrom.c |  13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diffs (37 lines):

diff -r 4441bb1a4f8a -r b66c52387124 sys/compat/linux/common/linux_cdrom.c
--- a/sys/compat/linux/common/linux_cdrom.c     Fri Feb 02 22:11:52 2001 +0000
+++ b/sys/compat/linux/common/linux_cdrom.c     Sat Feb 03 01:17:38 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: linux_cdrom.c,v 1.6 2000/12/10 14:12:16 fvdl Exp $ */
+/*     $NetBSD: linux_cdrom.c,v 1.7 2001/02/03 01:17:38 fvdl Exp $ */
 
 /*
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -242,12 +242,15 @@
                error = copyin(SCARG(uap, data), &l_subchnl, sizeof l_subchnl);
                if (error)
                        break;
+
+               printf("LINUX_CDROMSUBCHNL: format %d track %d\n",
+                   l_subchnl.cdsc_format, l_subchnl.cdsc_trk);
            
                sg = stackgap_init(p->p_emul);
                info = stackgap_alloc(&sg, sizeof *info);
-               t_subchannel.address_format = l_subchnl.cdsc_format;
-               t_subchannel.data_format = CD_CURRENT_POSITION;
-               t_subchannel.track = l_subchnl.cdsc_trk;
+               t_subchannel.address_format = CD_MSF_FORMAT;
+               t_subchannel.track = 0;
+               t_subchannel.data_format = l_subchnl.cdsc_format;
                t_subchannel.data_len = sizeof *info;
                t_subchannel.data = info;
                DPRINTF(("linux_ioctl: CDROMSUBCHNL %d %d\n",
@@ -402,7 +405,7 @@
        case LINUX_CDROM_DISC_STATUS:
        case LINUX_CDROM_CHANGER_NSLOTS:
        case LINUX_CDROM_GET_CAPABILITY:
-               error = EINVAL;
+               error = ENOSYS;
                break;
 
        case LINUX_DVD_READ_STRUCT:



Home | Main Index | Thread Index | Old Index