[PATCH] PCI: add PCI ROMs to sysfs
Linus has requested that the sysfs rom attribute be changed to require enabling before it works. echo "0" to the attribute to disable, echoing anything else enables the rom output. The concern is that something like a file browser could inadvertently read the attribute and change the state of the hardware without the user's knowledge. The attached patch includes the previous patch plus the enabling logic. [root@smirl 0000:02:02.0]# [root@smirl 0000:02:02.0]# cat rom cat: rom: Invalid argument [root@smirl 0000:02:02.0]# echo "1" >rom [root@smirl 0000:02:02.0]# hexdump -C -n 20 rom 00000000 55 aa 60 e9 d6 01 00 00 00 00 00 00 00 00 00 00 |U.`.............| 00000010 00 00 00 00 |....| 00000014 [root@smirl 0000:02:02.0]# echo "0" >rom [root@smirl 0000:02:02.0]# hexdump -C -n 20 rom hexdump: rom: Invalid argument [root@smirl 0000:02:02.0]# Signed-off-by: Jon Smirl <jonsmirl@gmail.com> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
Showing
drivers/pci/rom.c
0 → 100644
Please register or sign in to comment