patch-2.4.0-test7 linux/fs/proc/base.c
Next file: linux/fs/proc/generic.c
Previous file: linux/fs/proc/array.c
Back to the patch index
Back to the overall index
- Lines: 68
- Date:
Fri Aug 11 14:29:01 2000
- Orig file:
v2.4.0-test6/linux/fs/proc/base.c
- Orig date:
Mon Jul 10 16:47:26 2000
diff -u --recursive --new-file v2.4.0-test6/linux/fs/proc/base.c linux/fs/proc/base.c
@@ -522,12 +522,12 @@
fd = filp->f_pos;
switch (fd) {
case 0:
- if (filldir(dirent, ".", 1, 0, inode->i_ino) < 0)
+ if (filldir(dirent, ".", 1, 0, inode->i_ino, DT_DIR) < 0)
goto out;
filp->f_pos++;
case 1:
ino = fake_ino(pid, PROC_PID_INO);
- if (filldir(dirent, "..", 2, 1, ino) < 0)
+ if (filldir(dirent, "..", 2, 1, ino, DT_DIR) < 0)
goto out;
filp->f_pos++;
default:
@@ -555,7 +555,7 @@
} while (i);
ino = fake_ino(pid, PROC_PID_FD_DIR + fd);
- if (filldir(dirent, buf+j, NUMBUF-j, fd+2, ino) < 0)
+ if (filldir(dirent, buf+j, NUMBUF-j, fd+2, ino, DT_LNK) < 0)
break;
}
put_files_struct(files);
@@ -578,13 +578,13 @@
i = filp->f_pos;
switch (i) {
case 0:
- if (filldir(dirent, ".", 1, i, inode->i_ino) < 0)
+ if (filldir(dirent, ".", 1, i, inode->i_ino, DT_DIR) < 0)
return 0;
i++;
filp->f_pos++;
/* fall through */
case 1:
- if (filldir(dirent, "..", 2, i, PROC_ROOT_INO) < 0)
+ if (filldir(dirent, "..", 2, i, PROC_ROOT_INO, DT_DIR) < 0)
return 0;
i++;
filp->f_pos++;
@@ -595,7 +595,8 @@
return 1;
p = base_stuff + i;
while (p->name) {
- if (filldir(dirent, p->name, p->len, filp->f_pos, fake_ino(pid, p->type)) < 0)
+ if (filldir(dirent, p->name, p->len, filp->f_pos,
+ fake_ino(pid, p->type), p->mode >> 12) < 0)
return 0;
filp->f_pos++;
p++;
@@ -1007,7 +1008,7 @@
if (!nr) {
ino_t ino = fake_ino(0,PROC_PID_INO);
- if (filldir(dirent, "self", 4, filp->f_pos, ino) < 0)
+ if (filldir(dirent, "self", 4, filp->f_pos, ino, DT_LNK) < 0)
return 0;
filp->f_pos++;
nr++;
@@ -1022,7 +1023,7 @@
do buf[--j] = '0' + (pid % 10); while (pid/=10);
- if (filldir(dirent, buf+j, PROC_NUMBUF-j, filp->f_pos, ino) < 0)
+ if (filldir(dirent, buf+j, PROC_NUMBUF-j, filp->f_pos, ino, DT_DIR) < 0)
break;
filp->f_pos++;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)