I was just in the process of writing a post for the same thing. Wouldn't it
be better to do the following (against 2.4.17).
Tim
-- ********************************************************* * tpepper@vato dot org * Venimus, Vidimus, * * http://www.vato.org/~tpepper * Dolavimus * *********************************************************
--- linux-2.4.17-orig/blkpg.c Thu Jan 17 13:02:19 2002 +++ linux-2.4.17/blkpg.c Thu Jan 17 13:06:33 2002 @@ -246,8 +246,14 @@ if (cmd == BLKGETSIZE) return put_user((unsigned long)ullval, (unsigned long *)arg); - else + else { + if (hardsect_size[MAJOR(dev)][MINOR(dev)]) { + ullval *= hardsect_size[MAJOR(dev)][MINOR(dev)]; + } else { + ullval *= 512; + } return put_user(ullval, (u64 *)arg); + } #if 0 case BLKRRPART: /* Re-read partition tables */ if (!capable(CAP_SYS_ADMIN)) - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/