Re: [BK PATCH] add SMBIOS tables to sysfs

From: Greg KH
Date: Tue Apr 27 2004 - 22:33:54 EST


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
-
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/