Commit dc83289c authored by Matt Domsch's avatar Matt Domsch

[PATCH] BLKGETSIZE64 (bytes not sectors)

Linus, below is a patch to return the size of a device in bytes, not
in units of 512-byte sectors (which is incorrect per function
definition).  Tim Pepper submitted an equivalent patch for 2.4.x, now
included in 2.4.18-pre4.  Please apply.
parent 79b4dfa9
......@@ -280,7 +280,8 @@ int blk_ioctl(kdev_t dev, unsigned int cmd, unsigned long arg)
if (cmd == BLKGETSIZE)
return put_user((unsigned long)ullval, (unsigned long *)arg);
return put_user(ullval, (u64 *)arg);
else
return put_user((u64)ullval << 9 , (u64 *)arg);
#if 0
case BLKRRPART: /* Re-read partition tables */
if (!capable(CAP_SYS_ADMIN))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment