devfs
[Top] [All Lists]

Re: PATCH: Re: Strange devices in devfs

To: Richard Gooch <rgooch@xxxxxxxxxxxxxxx>
Subject: Re: PATCH: Re: Strange devices in devfs
From: Borsenkow Andrej <Andrej.Borsenkow@xxxxxxxxxxxxxx>
Date: 19 Jan 2002 23:11:04 +0300
Cc: devfs mailing list <devfs@xxxxxxxxxxx>, Mandrake kernel list <kernel@xxxxxxxxxxxxxxxx>
In-reply-to: <200201191947.g0JJl4s02410@vindaloo.ras.ucalgary.ca>
References: <1011389385.2428.1.camel@localhost.localdomain> <1011469337.2456.5.camel@localhost.localdomain> <200201191947.g0JJl4s02410@vindaloo.ras.ucalgary.ca>
Sender: owner-devfs@xxxxxxxxxxx
On Сбт, 2002-01-19 at 22:47, Richard Gooch wrote:
> Borsenkow Andrej writes:
> > 
> > --=-LF7ErWmLg/hcTmBTogqk
> > Content-Type: text/plain; charset=KOI8-R
> > Content-Transfer-Encoding: quoted-printable
> > Attached patch stops devfsd attempts to treat /dev/ide/cd as CD-ROM.=20
> 
> I can't apply this patch because it has those !@##$$ quoted
> printables. Please resend in plain ASCII.
> 

--- devfsd/compat_name.c~       Sat Jan 19 22:13:41 2002
+++ devfsd/compat_name.c        Sat Jan 19 22:25:40 2002
@@ -227,7 +227,8 @@
        compat_name = buffer;
     }
     else if ( (strncmp (devname, "ide/", 4) == 0) &&
-             (strcmp (devname + namelen - 2, "cd") == 0) )
+             (strcmp (devname + namelen - 2, "cd") == 0) &&
+             (namelen > 6) )
     {
        sprintf ( buffer, "hd%c",
                  get_old_ide_name (major, minor) );
--- devfsd/devfsd.c~    Sat Jan 19 22:13:41 2002
+++ devfsd/devfsd.c     Sat Jan 19 22:31:42 2002
@@ -1495,7 +1495,8 @@
                              4) == 0)
                sprintf ( compat_buf, "ide/hd/c%db%dt%du%dp%d",
                          host, bus, target, lun, atoi (ptr + 4) );
-           else if (strcmp (info->devname + info->namelen - 2, "cd") == 0)
+           else if ((strcmp (info->devname + info->namelen - 2, "cd") == 0) &&
+                    (info->namelen > 6))
                sprintf (compat_buf, "ide/cd/c%db%dt%du%d",
                         host, bus, target,lun);
            else if (strncmp (ptr = (strrchr (info->devname, '/') + 1), "mt",

<Prev in Thread] Current Thread [Next in Thread>