patch-2.2.3 linux/drivers/block/rd.c
Next file: linux/drivers/char/Config.in
Previous file: linux/drivers/block/nbd.c
Back to the patch index
Back to the overall index
- Lines: 20
- Date:
Wed Feb 24 16:27:54 1999
- Orig file:
v2.2.2/linux/drivers/block/rd.c
- Orig date:
Wed Aug 26 11:37:35 1998
diff -u --recursive --new-file v2.2.2/linux/drivers/block/rd.c linux/drivers/block/rd.c
@@ -170,14 +170,12 @@
break;
case BLKGETSIZE: /* Return device size */
if (!arg) return -EINVAL;
- err = verify_area(VERIFY_WRITE, (long *) arg,
- sizeof(long));
- if (err)
- return err;
- put_user(rd_length[MINOR(inode->i_rdev)] / 512,
+ return put_user(rd_length[MINOR(inode->i_rdev)] / 512,
(long *) arg);
- return 0;
-
+ case BLKSSZGET:
+ /* Block size of media */
+ return put_user(rd_blocksizes[MINOR(inode->i_rdev)],
+ (int *)arg);
default:
break;
};
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)