patch-2.3.3 linux/drivers/block/rd.c

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

diff -u --recursive --new-file v2.3.2/linux/drivers/block/rd.c linux/drivers/block/rd.c
@@ -72,6 +72,7 @@
  */
 #define MAJOR_NR RAMDISK_MAJOR
 #include <linux/blk.h>
+#include <linux/blkpg.h>
 
 /*
  * We use a block size of 512 bytes in comparision to BLOCK_SIZE
@@ -198,11 +199,10 @@
 			if (!arg)  return -EINVAL;
 			return put_user(rd_length[minor] >> RDBLK_SIZE_BITS, (long *) arg);
 
-		case BLKSSZGET:	   /* Block size of media */
-			if (!arg)  return -EINVAL;
-			return put_user(rd_blocksizes[minor], (int *)arg);
-
-		RO_IOCTLS(inode->i_rdev, arg);
+		case BLKROSET:
+		case BLKROGET:
+		case BLKSSZGET:
+			return blk_ioctl(inode->i_rdev, cmd, arg);
 
 		default:
 			return -EINVAL;
@@ -519,7 +519,7 @@
 	}
 
 	if (nblocks > (rd_length[unit] >> RDBLK_SIZE_BITS)) {
-		printk("RAMDISK: image too big! (%d/%d blocks)\n",
+		printk("RAMDISK: image too big! (%d/%ld blocks)\n",
 		       nblocks, rd_length[unit] >> RDBLK_SIZE_BITS);
 		goto done;
 	}

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