patch-2.4.10 linux/drivers/block/paride/pf.c

Next file: linux/drivers/block/paride/ppc6lnx.c
Previous file: linux/drivers/block/paride/pd.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.9/linux/drivers/block/paride/pf.c linux/drivers/block/paride/pf.c
@@ -482,11 +482,9 @@
                 put_user(0,(long *)&geo->start);
                 return 0;
             case BLKGETSIZE:
-                if (!arg) return -EINVAL;
-                err = verify_area(VERIFY_WRITE,(long *) arg,sizeof(long));
-                if (err) return (err);
-                put_user(PF.capacity,(long *) arg);
-                return (0);
+                return put_user(PF.capacity,(long *) arg);
+            case BLKGETSIZE64:
+                return put_user((u64)PF.capacity << 9,(u64 *)arg);
 	    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)