patch-1.3.21 linux/fs/proc/scsi.c

Next file: linux/fs/smbfs/README
Previous file: linux/fs/proc/root.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.20/linux/fs/proc/scsi.c linux/fs/proc/scsi.c
@@ -34,8 +34,6 @@
 			 char * buf, int count);
 static int proc_writescsi(struct inode * inode, struct file * file,
 			 const char * buf, int count);
-static int proc_readscsidir(struct inode *, struct file *, 
-			    void *, filldir_t filldir);
 static int proc_lookupscsi(struct inode *,const char *,int,struct inode **);
 static int proc_scsilseek(struct inode *, struct file *, off_t, int);
 
@@ -50,7 +48,7 @@
     proc_scsilseek,	/* lseek   */
     proc_readscsi,	/* read	   */
     proc_writescsi,	/* write   */
-    proc_readscsidir,	/* readdir */
+    NULL,		/* readdir */
     NULL,		/* select  */
     NULL,		/* ioctl   */
     NULL,		/* mmap	   */
@@ -80,15 +78,6 @@
     NULL	    /* permission  */
 };
 
-struct proc_dir_entry proc_scsi = {
-	PROC_SCSI, 4, "scsi",
-	S_IFDIR | S_IRUGO | S_IXUGO, 2, 0, 0,
-	0, &proc_scsi_inode_operations,
-	NULL, NULL,
-	NULL,
-	&proc_root, NULL
-};
-
 struct proc_dir_entry scsi_dir[PROC_SCSI_FILE - PROC_SCSI_SCSI + 3]; 
 struct proc_dir_entry scsi_hba_dir[(PROC_SCSI_LAST - PROC_SCSI_FILE) * 4]; 
 
@@ -175,36 +164,6 @@
     }
     iput(dir);
     return(-ENOENT);
-}
-
-static int proc_readscsidir(struct inode * inode, struct file * filp,
-			    void * dirent, filldir_t filldir)
-{
-    struct proc_dir_entry * de;
-    uint index, num;
- 
-    num = 0;
-
-    if (!inode || !S_ISDIR(inode->i_mode))
-	return(-EBADF);
-
-    index = count_dir_entries(inode->i_ino, &num);
-
-    while (((unsigned) filp->f_pos + index) < index + num) {
-	if (dispatch_scsi_info_ptr) {
-	    if (inode->i_ino <= PROC_SCSI_SCSI)
-		de = scsi_dir + filp->f_pos;
-	    else
-		de = scsi_hba_dir + filp->f_pos + index;
-        }
-	else {
-	    de = scsi_dir2 + filp->f_pos;
-        }
-	if (filldir(dirent, de->name, de->namelen, filp->f_pos, de->low_ino)<0)
-	    break;
-	filp->f_pos++;
-    }
-    return(0);
 }
 
 int get_not_present_info(char *buffer, char **start, off_t offset, int length)

FUNET's LINUX-ADM group, [email protected]
TCL-scripts by Sam Shen, [email protected] with Sam's (original) version
of this