patch-2.4.10 linux/drivers/mtd/mtdblock_ro.c

Next file: linux/drivers/mtd/nand/Config.in
Previous file: linux/drivers/mtd/mtdblock.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.9/linux/drivers/mtd/mtdblock_ro.c linux/drivers/mtd/mtdblock_ro.c
@@ -211,9 +211,9 @@
 
 	switch (cmd) {
 	case BLKGETSIZE:   /* Return device size */
-		if (!arg)  return -EFAULT;
-		return Put_user((mtd->size >> 9),
-                                (long *) arg);
+		return put_user((mtd->size >> 9), (long *) arg);
+	case BLKGETSIZE64:
+		return put_user((u64)mtd->size, (u64 *)arg);
 		
 	case BLKFLSBUF:
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,0)

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