patch-1.3.4 linux/drivers/scsi/scsi_ioctl.c

Next file: linux/drivers/scsi/sd_ioctl.c
Previous file: linux/drivers/scsi/scsi.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.3/linux/drivers/scsi/scsi_ioctl.c linux/drivers/scsi/scsi_ioctl.c
@@ -33,7 +33,7 @@
 	const char * string;
 	
 	if ((temp = host->hostt->present) && buffer) {
-		len = get_fs_long ((unsigned long *) buffer);
+		len = get_user ((unsigned int *) buffer);
 		if(host->hostt->info)
 		  string = host->hostt->info(host);
 		else 
@@ -157,11 +157,11 @@
 	if (!buffer)
 		return -EINVAL;
 	
-	inlen = get_fs_long((unsigned long *) buffer);
-	outlen = get_fs_long( ((unsigned long *) buffer) + 1);
+	inlen = get_user((unsigned int *) buffer);
+	outlen = get_user( ((unsigned int *) buffer) + 1);
 
 	cmd_in = (char *) ( ((int *)buffer) + 2);
-	opcode = get_fs_byte(cmd_in); 
+	opcode = get_user(cmd_in); 
 
 	needed = buf_needed = (inlen > outlen ? inlen : outlen);
 	if(buf_needed){
@@ -249,8 +249,8 @@
 	switch (cmd) {
 	        case SCSI_IOCTL_GET_IDLUN:
 	                verify_area(VERIFY_WRITE, (void *) arg, sizeof(int));
-			put_fs_long(dev->id + (dev->lun << 8) + 
-				    (dev->host->host_no << 16), (unsigned long *) arg);
+			put_user(dev->id + (dev->lun << 8) + 
+				 (dev->host->host_no << 16), (unsigned int *) arg);
 			return 0;
 		case SCSI_IOCTL_TAGGED_ENABLE:
 			if(!suser())  return -EACCES;

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