patch-2.1.55 linux/fs/proc/root.c
Next file: linux/fs/readdir.c
Previous file: linux/fs/proc/fd.c
Back to the patch index
Back to the overall index
- Lines: 42
- Date:
Sun Sep 7 14:00:24 1997
- Orig file:
v2.1.54/linux/fs/proc/root.c
- Orig date:
Sun Sep 7 13:10:43 1997
diff -u --recursive --new-file v2.1.54/linux/fs/proc/root.c linux/fs/proc/root.c
@@ -23,7 +23,7 @@
*/
#define FIRST_PROCESS_ENTRY 256
-static int proc_root_readdir(struct inode *, struct file *, void *, filldir_t);
+static int proc_root_readdir(struct file *, void *, filldir_t);
static int proc_root_lookup(struct inode *,struct dentry *);
static unsigned char proc_alloc_map[PROC_NDYNAMIC / 8] = {0};
@@ -734,12 +734,13 @@
* value of the readdir() call, as long as it's non-negative
* for success..
*/
-int proc_readdir(struct inode * inode, struct file * filp,
+int proc_readdir(struct file * filp,
void * dirent, filldir_t filldir)
{
struct proc_dir_entry * de;
unsigned int ino;
int i;
+ struct inode *inode = filp->f_dentry->d_inode;
if (!inode || !S_ISDIR(inode->i_mode))
return -ENOTDIR;
@@ -786,7 +787,7 @@
#define NUMBUF 10
-static int proc_root_readdir(struct inode * inode, struct file * filp,
+static int proc_root_readdir(struct file * filp,
void * dirent, filldir_t filldir)
{
struct task_struct *p;
@@ -794,7 +795,7 @@
unsigned int nr = filp->f_pos;
if (nr < FIRST_PROCESS_ENTRY) {
- int error = proc_readdir(inode, filp, dirent, filldir);
+ int error = proc_readdir(filp, dirent, filldir);
if (error <= 0)
return error;
filp->f_pos = FIRST_PROCESS_ENTRY;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov