patch-2.4.15 linux/drivers/block/paride/pd.c

Next file: linux/drivers/block/ps2esdi.c
Previous file: linux/drivers/block/loop.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.14/linux/drivers/block/paride/pd.c linux/drivers/block/paride/pd.c
@@ -475,18 +475,12 @@
 		}
                 put_user(pd_hd[dev].start_sect,(long *)&geo->start);
                 return 0;
-            case BLKGETSIZE:
-                if (!arg) return -EINVAL;
-                err = verify_area(VERIFY_WRITE,(unsigned long *) arg,sizeof(unsigned long));
-                if (err) return (err);
-                put_user(pd_hd[dev].nr_sects,(unsigned long *) arg);
-                return (0);
-            case BLKGETSIZE64:
-                return put_user((u64)pd_hd[dev].nr_sects << 9, (u64 *)arg);
             case BLKRRPART:
 		if (!capable(CAP_SYS_ADMIN))
 			return -EACCES;
                 return pd_revalidate(inode->i_rdev);
+	    case BLKGETSIZE:
+	    case BLKGETSIZE64:
 	    case BLKROSET:
 	    case BLKROGET:
 	    case BLKRASET:

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)