summaryrefslogtreecommitdiffstats
path: root/fs/proc/proc_misc.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-03-02 02:36:47 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-03-02 02:36:47 +0000
commit8624512aa908741ba2795200133eae0d7f4557ea (patch)
treed5d3036fccf2604f4c98dedc11e8adb929d6b52e /fs/proc/proc_misc.c
parent7b8f5d6f1d45d9f9de1d26e7d3c32aa5af11b488 (diff)
Merge with 2.3.48.
Diffstat (limited to 'fs/proc/proc_misc.c')
-rw-r--r--fs/proc/proc_misc.c45
1 files changed, 21 insertions, 24 deletions
diff --git a/fs/proc/proc_misc.c b/fs/proc/proc_misc.c
index 3ad4bfabf..1f7ba6b99 100644
--- a/fs/proc/proc_misc.c
+++ b/fs/proc/proc_misc.c
@@ -598,28 +598,11 @@ static struct file_operations proc_profile_operations = {
write: write_profile,
};
-static struct inode_operations proc_profile_inode_operations = {
- &proc_profile_operations,
-};
-
-static struct proc_dir_entry proc_root_kmsg = {
- 0, 4, "kmsg",
- S_IFREG | S_IRUSR, 1, 0, 0,
- 0, &proc_kmsg_inode_operations
-};
-struct proc_dir_entry proc_root_kcore = {
- 0, 5, "kcore",
- S_IFREG | S_IRUSR, 1, 0, 0,
- 0, &proc_kcore_inode_operations
-};
-static struct proc_dir_entry proc_root_profile = {
- 0, 7, "profile",
- S_IFREG | S_IRUGO | S_IWUSR, 1, 0, 0,
- 0, &proc_profile_inode_operations
-};
+struct proc_dir_entry *proc_root_kcore;
void __init proc_misc_init(void)
{
+ struct proc_dir_entry *entry;
static struct {
char *name;
int (*read_proc)(char*,char**,off_t,int,int*,void*);
@@ -665,11 +648,25 @@ void __init proc_misc_init(void)
create_proc_read_entry(p->name, 0, NULL, p->read_proc, NULL);
/* And now for trickier ones */
- proc_register(&proc_root, &proc_root_kmsg);
- proc_register(&proc_root, &proc_root_kcore);
- proc_root_kcore.size = (size_t)high_memory - PAGE_OFFSET + PAGE_SIZE;
+ entry = create_proc_entry("kmsg", S_IRUSR, &proc_root);
+ if (entry)
+ entry->proc_fops = &proc_kmsg_operations;
+ proc_root_kcore = create_proc_entry("kcore", S_IRUSR, NULL);
+ if (proc_root_kcore) {
+ proc_root_kcore->proc_fops = &proc_kcore_operations;
+ proc_root_kcore->size =
+ (size_t)high_memory - PAGE_OFFSET + PAGE_SIZE;
+ }
if (prof_shift) {
- proc_register(&proc_root, &proc_root_profile);
- proc_root_profile.size = (1+prof_len) * sizeof(unsigned int);
+ entry = create_proc_entry("profile", S_IWUSR | S_IRUGO, NULL);
+ if (entry) {
+ entry->proc_fops = &proc_profile_operations;
+ entry->size = (1+prof_len) * sizeof(unsigned int);
+ }
}
+#ifdef __powerpc__
+ entry = create_proc_entry("ppc_htab", S_IRUGO|S_IWUSR, NULL);
+ if (entry)
+ entry->proc_fops = &ppc_htab_operations;
+#endif
}