mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
[PATCH] ipmi poweroff: fix chassis control
The IPMI power control function proc_write_chassctrl was badly written, it directly used userspace pointers, it assumed that strings were NULL terminated, and it used the evil sscanf function. This converts over to using the sysctl interface for this data and changes the semantics to be a little more logical. Signed-off-by: Corey Minyard <minyard@acm.org> Cc: <viro@parcelfarce.linux.theplanet.co.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
877197ef89
commit
8c702e1620
3 changed files with 69 additions and 78 deletions
|
@ -711,6 +711,7 @@ enum {
|
|||
DEV_RAID=4,
|
||||
DEV_MAC_HID=5,
|
||||
DEV_SCSI=6,
|
||||
DEV_IPMI=7,
|
||||
};
|
||||
|
||||
/* /proc/sys/dev/cdrom */
|
||||
|
@ -776,6 +777,11 @@ enum {
|
|||
DEV_SCSI_LOGGING_LEVEL=1,
|
||||
};
|
||||
|
||||
/* /proc/sys/dev/ipmi */
|
||||
enum {
|
||||
DEV_IPMI_POWEROFF_POWERCYCLE=1,
|
||||
};
|
||||
|
||||
/* /proc/sys/abi */
|
||||
enum
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue