Re: [BK PATCH] add SMBIOS tables to sysfs

Greg KH
2004-04-28T03:31:04Z

On Tue, Apr 27, 2004 at 09:27:49PM -0500, Michael Brown wrote:
> Andrew,
> Below is a short patch to add SMBIOS data to sysfs. It it against latest
> bitkeeper 2.6.6-rc (specifically, it applies after the efivars patch that
> recently went in) but should apply to any recent kernel with only minor
> reject on drivers/firmware/Makefile. A version for 2.4 (using /proc) will
> follow tomorrow.

Nice idea and patch. A few minor comments:

> /sys/firmware/smbios/smbios/table_entry_point
> /sys/firmware/smbios/smbios/table

Why repeat the "smbios" directory? Is this a limitation in the sysfs
interface right now? Or are you going to put more files in the main
smbios directory some day?

> + snprintf(sdev->kobj.name, 7, "smbios" );

Try using kobject_set_name() instead, it will do the proper thing if the
string is bigger than the base kobj.name field.

thanks,

greg k-h