mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-18 22:54:00 +00:00
47 lines
1.3 KiB
Diff
47 lines
1.3 KiB
Diff
|
diff -urpN linux-2.6.28.7/fs/proc/firmware.c linux-2.6.28.7_b/fs/proc/firmware.c
|
||
|
--- linux-2.6.28.7/fs/proc/firmware.c 1969-12-31 19:00:00.000000000 -0500
|
||
|
+++ linux-2.6.28.7_b/fs/proc/firmware.c 2009-05-12 17:47:21.000000000 -0400
|
||
|
@@ -0,0 +1,31 @@
|
||
|
+#include <linux/fs.h>
|
||
|
+#include <linux/init.h>
|
||
|
+#include <linux/proc_fs.h>
|
||
|
+#include <linux/seq_file.h>
|
||
|
+
|
||
|
+#define FIRMWARE_STRING "lifeline"
|
||
|
+
|
||
|
+static int firmware_proc_show(struct seq_file *m, void *v)
|
||
|
+{
|
||
|
+ seq_printf(m, "%s\n", FIRMWARE_STRING);
|
||
|
+ return 0;
|
||
|
+}
|
||
|
+
|
||
|
+static int firmware_proc_open(struct inode *inode, struct file *file)
|
||
|
+{
|
||
|
+ return single_open(file, firmware_proc_show, NULL);
|
||
|
+}
|
||
|
+
|
||
|
+static const struct file_operations firmware_proc_fops = {
|
||
|
+ .open = firmware_proc_open,
|
||
|
+ .read = seq_read,
|
||
|
+ .llseek = seq_lseek,
|
||
|
+ .release = single_release,
|
||
|
+};
|
||
|
+
|
||
|
+static int __init proc_firmware_init(void)
|
||
|
+{
|
||
|
+ proc_create("firmware", 0, NULL, &firmware_proc_fops);
|
||
|
+ return 0;
|
||
|
+}
|
||
|
+module_init(proc_firmware_init);
|
||
|
diff -urpN linux-2.6.28.7/fs/proc/Makefile linux-2.6.28.7_b/fs/proc/Makefile
|
||
|
--- a/fs/proc/Makefile 2010-10-20 20:30:22.000000000 +0000
|
||
|
+++ b/fs/proc/Makefile 2010-11-07 18:22:50.000000000 +0000
|
||
|
@@ -18,6 +18,7 @@
|
||
|
proc-y += stat.o
|
||
|
proc-y += uptime.o
|
||
|
proc-y += version.o
|
||
|
+proc-y += firmware.o
|
||
|
proc-y += softirqs.o
|
||
|
proc-$(CONFIG_PROC_SYSCTL) += proc_sysctl.o
|
||
|
proc-$(CONFIG_NET) += proc_net.o
|