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",
|