Re: [PATCH][5/5][resend] floppy.c: Fix device_create_file() warning

From: Mikael Pettersson
Date: Tue Mar 20 2007 - 07:57:03 EST


On Tue, 20 Mar 2007 12:29:49 +0100 (CET), Andreas Kleen <ak@xxxxxxx> wrote:
> > The floppy driver's sysfs file just provides some auxiliary
> > information to user-space, none of which matters for most of
> > its users. It is IMO totally inappropriate to fail floppy
> > driver init in this case.
>
> I thought it was for udev to create the device nodes? But
> I might be wrong on that.

It's a file called "cmos" containing the ASCII
representation of UDP->cmos, which appears to be some
kind of "type" indicator. See floppy_cmos_show().

The file is only readable, not even root can write to it.

On one of my machines it contains the value "4", but the
device nodes udev created are still just /dev/fd0 and
/dev/floppy -> /dev/fd0, so I don't think it affects udev.

The "cmos" file seems to be a relatively new addition,
as another machine here running an RHEL4 2.6.9 kernel
doesn't have it.

Unless someone can prove that it's useful I think it
should be removed.

/Mikael
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/