patch-1.3.5 linux/fs/proc/inode.c
Next file: linux/fs/proc/root.c
Previous file: linux/fs/proc/Makefile
Back to the patch index
Back to the overall index
- Lines: 39
- Date:
Thu Jun 29 12:10:49 1995
- Orig file:
v1.3.4/linux/fs/proc/inode.c
- Orig date:
Tue Jun 27 14:11:43 1995
diff -u --recursive --new-file v1.3.4/linux/fs/proc/inode.c linux/fs/proc/inode.c
@@ -165,6 +165,26 @@
return;
}
+ if (ino == PROC_SCSI_SCSI) {
+ inode->i_mode = S_IFREG | S_IWUSR;
+ inode->i_op = &proc_scsi_inode_operations;
+ return;
+ }
+ /* files within /proc/scsi */
+ if ((ino > PROC_SCSI_SCSI) && (ino < PROC_SCSI_FILE)) {
+ inode->i_nlink = 2;
+ inode->i_mode = S_IFDIR | S_IRUGO | S_IXUGO;
+ inode->i_op = &proc_scsi_inode_operations;
+ return;
+ }
+
+ /* files within /proc/scsi/<driver>/ */
+ if ((ino >= PROC_SCSI_FILE) && (ino <= PROC_SCSI_LAST)) {
+ inode->i_mode = S_IFREG | S_IRUGO | S_IWUSR;
+ inode->i_op = &proc_scsi_inode_operations;
+ return;
+ }
+
if (!pid) {
switch (ino) {
case PROC_KMSG:
@@ -176,6 +196,11 @@
inode->i_nlink = 2;
inode->i_op = &proc_net_inode_operations;
break;
+ case PROC_SCSI:
+ inode->i_mode = S_IFDIR | S_IRUGO | S_IXUGO;
+ inode->i_nlink = 2;
+ inode->i_op = &proc_scsi_inode_operations;
+ break;
case PROC_KCORE:
inode->i_mode = S_IFREG | S_IRUSR;
inode->i_op = &proc_kcore_inode_operations;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov
with Sam's (original) version of this