Skip to contentSkip to conversation

proc: move /proc/modules boilerplate to kernel/module.c

PATCH In review Alexey Dobriyan 1 participant 1 message Oct 17, 2008 Proc filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 26/31 proc: move /proc/modules boilerplate to kernel/module.c

Quoted 2 lines

From ef4a360b6157d71825846f4853c2eee0c2cf27cb Mon Sep 17 00:00:00 2001

From: Alexey Dobriyan <[email protected]>
Date: Mon, 6 Oct 2008 13:19:27 +0400
Subject: [PATCH 26/31] proc: move /proc/modules boilerplate to kernel/module.c

---
 fs/proc/proc_misc.c |   17 --------------
 kernel/module.c     |   59 +++++++++++++++++++++++++++++++++++---------------
 2 files changed, 41 insertions(+), 35 deletions(-)
fs/proc/proc_misc.c +0 -17
index 67b02ee..429376e 100644
@@ -56,20 +56,6 @@
 #include <asm/div64.h>
 #include "internal.h"
 
-#ifdef CONFIG_MODULES
-extern const struct seq_operations modules_op;
-static int modules_open(struct inode *inode, struct file *file)
-{
-	return seq_open(file, &modules_op);
-}
-static const struct file_operations proc_modules_operations = {
-	.open		= modules_open,
-	.read		= seq_read,
-	.llseek		= seq_lseek,
-	.release	= seq_release,
-};
-#endif
-
 #ifdef CONFIG_PROC_PAGE_MONITOR
 #define KPMSIZE sizeof(u64)
 #define KPMMASK (KPMSIZE - 1)
@@ -208,9 +194,6 @@ void __init proc_misc_init(void)
 	proc_symlink("mounts", NULL, "self/mounts");
 
 	/* And now for trickier ones */
-#ifdef CONFIG_MODULES
-	proc_create("modules", 0, NULL, &proc_modules_operations);
-#endif
 #ifdef CONFIG_SCHEDSTATS
 	proc_create("schedstat", 0, NULL, &proc_schedstat_operations);
 #endif
kernel/module.c +41 -18

94 lines not on this page · raw message

Signature · 1 line
1.5.6.5