From: Davidlohr Bueso <dave@xxxxxxx> Date: Mon, 20 Jun 2011 23:10:13 -0400 Produce a warning if the device is misaligned. Signed-off-by: Davidlohr Bueso <dave@xxxxxxx> --- disk-utils/mkfs.minix.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/disk-utils/mkfs.minix.c b/disk-utils/mkfs.minix.c index 405e241..bc7d941 100644 --- a/disk-utils/mkfs.minix.c +++ b/disk-utils/mkfs.minix.c @@ -653,6 +653,11 @@ int main(int argc, char ** argv) { DEV = open(device_name,O_RDWR | O_EXCL); else DEV = open(device_name,O_RDWR); + + if (blkdev_is_misaligned(DEV)) + warnx(_("warning: %s is misaligned"), device_name); + + if (DEV<0) err(MKFS_ERROR, _("%s: open failed"), device_name); if (S_ISBLK(statbuf.st_mode)) { -- 1.7.5.4 -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html