Skip to contentSkip to conversation

add SMBIOS information to /proc/smbios -- UPDATE 2

PATCH New Michael Brown 1 participant 1 message Apr 30, 2004 Char and misc drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 add SMBIOS information to /proc/smbios -- UPDATE 2

Marcelo, Al,
Below is the updated patch for /proc/smbios/, with all changes
integrated per Al's review comments (round 2). Patch has been compile, boot and stress tested.

Al, if this patch is ok with you, can you please ack it with
Marcelo? If not, please let me know if there are other issues and I will take care of them tomorrow, as it is bedtime for me. Once again, thanks for reviewing this and taking time to point out the problems for me. I really appreciate it.

For reference, here are previous postings:
Previous 2.4 thread:
http://marc.theaimsgroup.com/?t=108321757100001&r=1&w=1

Previous 2.6 thread:
http://marc.theaimsgroup.com/?t=108311959700002&r=1&w=1

Thank you,
Michael Brown

# This is a BitKeeper generated diff -Nru style patch. #
# ChangeSet
# 2004/04/29 23:58:04-05:00 [email protected]
# changes per code review from Al Viro.
#

# drivers/char/smbios.c
#   2004/04/29 23:58:02-05:00 [email protected] +11 -9
#   Updates per comments from Al Viro. Fix stilistic issue, unsigned vs signed issue, and check return value from put_user.
# 
# ChangeSet
#   2004/04/29 21:11:19-05:00 [email protected] 
#   Updates per Al Viro: 
#   	-- remove MOD_{INC,DEC}_USE_COUNT
#   	-- use normal read call instead of proc read call
# 
# drivers/char/smbios.c
#   2004/04/29 21:11:17-05:00 [email protected] +35 -47
#   Updates per comments from Al Viro.
# 
# ChangeSet
#   2004/04/29 00:16:35-05:00 [email protected] 
#   rename smbios to proper smbios.c
# 
# drivers/char/Makefile
#   2004/04/29 00:09:15-05:00 [email protected] +1 -1
#   rename smbios driver to 'smbios'.
# 
# drivers/char/smbios.c
#   2004/04/29 00:08:51-05:00 [email protected] +0 -0
#   Rename: drivers/char/procsmbios.c -> drivers/char/smbios.c
# 
# ChangeSet
#   2004/04/28 23:51:19-05:00 [email protected] 
#   Add SMBIOS driver that exports system SMBIOS information as files in /proc/smbios.
# 
# drivers/char/smbios.h
#   2004/04/28 23:50:15-05:00 [email protected] +53 -0
# 
# drivers/char/procsmbios.c
#   2004/04/28 23:50:15-05:00 [email protected] +251 -0
# 
# drivers/char/smbios.h
#   2004/04/28 23:50:15-05:00 [email protected] +0 -0
#   BitKeeper file /home/michael_e_brown/kernel/bk/subtrees/smbios-24-driver/drivers/char/smbios.h
# 
# drivers/char/procsmbios.c
#   2004/04/28 23:50:15-05:00 [email protected] +0 -0
#   BitKeeper file /home/michael_e_brown/kernel/bk/subtrees/smbios-24-driver/drivers/char/procsmbios.c
# 
# drivers/char/Makefile
#   2004/04/28 23:50:15-05:00 [email protected] +1 -0
#   Add SMBIOS driver to build system
# 
# drivers/char/Config.in
#   2004/04/28 23:50:15-05:00 [email protected] +1 -0
#   Add config option to turn on SMBIOS proc driver
# 
# Documentation/Configure.help
#   2004/04/28 23:50:15-05:00 [email protected] +14 -0
#   Add help text for SMBIOS driver
# 
diff -Nru a/Documentation/Configure.help b/Documentation/Configure.help
--- a/Documentation/Configure.help	Thu Apr 29 23:58:22 2004
+++ b/Documentation/Configure.help	Thu Apr 29 23:58:22 2004
@@ -19914,6 +19914,20 @@

If unsure, say N.

+SMBIOS table information in /proc
+CONFIG_SMBIOS

+  This driver creates two files in /proc, /proc/smbios/table_entry_point
+  and /proc/smbios/table. These two files contain the contents of the 
+  BIOS-generated SMBIOS tables. Generally, PC-like architectures made
+  after 1997 have this, it is safe to enable on any system.
+  
+  To compile this driver as a module ( = code which can be inserted in
+  and removed from the running kernel whenever you want), say M here
+  and read <file:Documentation/modules.txt>. The module will be called
+  smbios.o.

+
+ If unsure, say N.
+
Sony Vaio Programmable I/O Control Device support CONFIG_SONYPI
This driver enables access to the Sony Programmable I/O Control

drivers/char/Config.in +1 -0
diff -Nru a/drivers/char/Config.in b/drivers/char/Config.in
@@ -333,6 +333,7 @@
 if [ "$CONFIG_EXPERIMENTAL" = "y" -a "$CONFIG_X86" = "y" -a "$CONFIG_X86_64" != "y" ]; then
    dep_tristate 'Sony Vaio Programmable I/O Control Device support (EXPERIMENTAL)' CONFIG_SONYPI $CONFIG_PCI
 fi
+tristate 'SMBIOS table information in /proc' CONFIG_SMBIOS
 
 mainmenu_option next_comment
 comment 'Ftape, the floppy tape device driver'
drivers/char/Makefile +1 -0
diff -Nru a/drivers/char/Makefile b/drivers/char/Makefile
@@ -265,6 +265,7 @@
 obj-$(CONFIG_HW_RANDOM) += hw_random.o
 obj-$(CONFIG_AMD_PM768) += amd76x_pm.o
 obj-$(CONFIG_BRIQ_PANEL) += briq_panel.o
+obj-$(CONFIG_SMBIOS) += smbios.o
 
 obj-$(CONFIG_ITE_GPIO) += ite_gpio.o
 obj-$(CONFIG_AU1X00_GPIO) += au1000_gpio.o
drivers/char/smbios.c new file +241 -0

241 lines not on this page · raw message

drivers/char/smbios.h new file +53 -0

53 lines not on this page · raw message