patch-2.3.29 linux/include/linux/proc_fs.h
Next file: linux/include/linux/sched.h
Previous file: linux/include/linux/pipe_fs_i.h
Back to the patch index
Back to the overall index
- Lines: 178
- Date:
Tue Nov 23 12:56:20 1999
- Orig file:
v2.3.28/linux/include/linux/proc_fs.h
- Orig date:
Thu Nov 11 20:11:53 1999
diff -u --recursive --new-file v2.3.28/linux/include/linux/proc_fs.h linux/include/linux/proc_fs.h
@@ -53,7 +53,7 @@
int count, int *eof, void *data);
typedef int (write_proc_t)(struct file *file, const char *buffer,
unsigned long count, void *data);
-typedef int (get_info_t)(char *, char **, off_t, int, int);
+typedef int (get_info_t)(char *, char **, off_t, int);
struct proc_dir_entry {
unsigned short low_ino;
@@ -71,24 +71,18 @@
void *data;
read_proc_t *read_proc;
write_proc_t *write_proc;
- int (*readlink_proc)(struct proc_dir_entry *de, char *page);
unsigned int count; /* use count */
int deleted; /* delete flag */
+ kdev_t rdev;
};
#define PROC_INODE_PROPER(inode) ((inode)->i_ino & ~0xffff)
-#define PROC_INODE_OPENPROM(inode) \
- ((inode->i_ino >= PROC_OPENPROM_FIRST) \
- && (inode->i_ino < PROC_OPENPROM_FIRST + PROC_NOPENPROM))
#ifdef CONFIG_PROC_FS
extern struct proc_dir_entry proc_root;
extern struct proc_dir_entry *proc_root_fs;
extern struct proc_dir_entry *proc_net;
-extern struct proc_dir_entry proc_sys;
-extern struct proc_dir_entry proc_openprom;
-extern struct proc_dir_entry *proc_mca;
extern struct proc_dir_entry *proc_bus;
extern struct proc_dir_entry *proc_root_driver;
extern struct proc_dir_entry proc_root_kcore;
@@ -101,62 +95,15 @@
int proc_pid_readdir(struct file * filp, void * dirent, filldir_t filldir);
extern int proc_register(struct proc_dir_entry *, struct proc_dir_entry *);
-extern int proc_unregister(struct proc_dir_entry *, int);
extern struct proc_dir_entry *create_proc_entry(const char *name, mode_t mode,
struct proc_dir_entry *parent);
extern void remove_proc_entry(const char *name, struct proc_dir_entry *parent);
-
-/*
- * retrieve the proc_dir_entry associated with /proc/driver/$module_name
- */
-extern inline
-struct proc_dir_entry *proc_driver_find (const char *module_name)
-{
- struct proc_dir_entry *p;
-
- p = proc_root_driver->subdir;
- while (p != NULL) {
- if (strcmp (p->name, module_name) == 0)
- return p;
-
- p = p->next;
- }
- return NULL;
-}
-
-
-/*
- * remove /proc/driver/$module_name, and all its contents
- */
-extern inline int proc_driver_unregister(const char *module_name)
-{
- remove_proc_entry (module_name, proc_root_driver);
- return 0;
-}
-
-
-/*
- * create driver-specific playground directory, /proc/driver/$module_name
- */
-extern inline int proc_driver_register(const char *module_name)
-{
- struct proc_dir_entry *p;
-
- p = create_proc_entry (module_name, S_IFDIR, proc_root_driver);
-
- return (p == NULL) ? -1 : 0;
-}
-
extern struct super_block *proc_super_blocks;
-extern struct dentry_operations proc_dentry_operations;
extern struct super_block *proc_read_super(struct super_block *,void *,int);
extern int init_proc_fs(void);
extern struct inode * proc_get_inode(struct super_block *, int, struct proc_dir_entry *);
-extern int proc_statfs(struct super_block *, struct statfs *, int);
-extern void proc_read_inode(struct inode *);
-extern void proc_write_inode(struct inode *);
extern int proc_match(int, const char *,struct proc_dir_entry *);
@@ -178,22 +125,11 @@
mode_t mode;
char name[32];
};
-extern struct inode_operations *
-proc_openprom_register(int (*readdir)(struct file *, void *, filldir_t),
- struct dentry * (*lookup)(struct inode *, struct dentry *),
- void (*use)(struct inode *, int),
- struct openpromfs_dev ***);
-extern void proc_openprom_deregister(void);
-extern void (*proc_openprom_use)(struct inode *,int);
extern int proc_openprom_regdev(struct openpromfs_dev *);
extern int proc_openprom_unregdev(struct openpromfs_dev *);
-extern struct inode_operations proc_dir_inode_operations;
-extern struct inode_operations proc_file_inode_operations;
-extern struct inode_operations proc_openprom_inode_operations;
extern struct inode_operations proc_sys_inode_operations;
extern struct inode_operations proc_kcore_inode_operations;
-extern struct inode_operations proc_profile_inode_operations;
extern struct inode_operations proc_kmsg_inode_operations;
#if CONFIG_AP1000
extern struct inode_operations proc_ringbuf_inode_operations;
@@ -213,6 +149,12 @@
*/
extern void proc_device_tree_init(void);
+extern struct proc_dir_entry *proc_symlink(const char *,
+ struct proc_dir_entry *,char *);
+extern struct proc_dir_entry *proc_mknod(const char *,mode_t,
+ struct proc_dir_entry *,kdev_t);
+extern struct proc_dir_entry *proc_mkdir(const char *,struct proc_dir_entry *);
+
extern inline struct proc_dir_entry *create_proc_read_entry(const char *name,
mode_t mode, struct proc_dir_entry *base,
read_proc_t *read_proc, void * data)
@@ -247,7 +189,6 @@
#else
extern inline int proc_register(struct proc_dir_entry *a, struct proc_dir_entry *b) { return 0; }
-extern inline int proc_unregister(struct proc_dir_entry *a, int b) { return 0; }
extern inline struct proc_dir_entry *proc_net_create(const char *name, mode_t mode,
get_info_t *get_info) {return NULL;}
extern inline void proc_net_remove(const char *name) {}
@@ -256,6 +197,12 @@
mode_t mode, struct proc_dir_entry *parent) { return NULL; }
extern inline void remove_proc_entry(const char *name, struct proc_dir_entry *parent) {};
+extern inline proc_dir_entry *proc_symlink(const char *name,
+ struct proc_dir_entry *parent,char *dest) {return NULL;}
+extern inline proc_dir_entry *proc_mknod(const char *name,mode_t mode,
+ struct proc_dir_entry *parent,kdev_t rdev) {return NULL;}
+extern struct proc_dir_entry *proc_mkdir(const char *name,
+ struct proc_dir_entry *parent) {return NULL;}
extern inline struct proc_dir_entry *create_proc_read_entry(const char *name,
mode_t mode, struct proc_dir_entry *base,
@@ -267,22 +214,6 @@
extern inline void proc_tty_register_driver(struct tty_driver *driver) {};
extern inline void proc_tty_unregister_driver(struct tty_driver *driver) {};
-
-extern inline
-struct proc_dir_entry *proc_driver_find (const char *module_name)
-{
- return NULL;
-}
-
-extern inline int proc_driver_unregister(const char *module_name)
-{
- return 0;
-}
-
-extern inline int proc_driver_register(const char *module_name)
-{
- return 0;
-}
extern struct proc_dir_entry proc_root;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)