This patch produces the program to warn if the given device is misaligned. Signed-off-by: Davidlohr Bueso <dave@xxxxxxx> --- disk-utils/mkswap.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/disk-utils/mkswap.c b/disk-utils/mkswap.c index 599b9b0..33717a1 100644 --- a/disk-utils/mkswap.c +++ b/disk-utils/mkswap.c @@ -588,6 +588,10 @@ main(int argc, char **argv) { exit(EXIT_FAILURE); } + if (blkdev_is_misaligned(DEV)) + warnx(_("warning: %s is misaligned"), + device_name); + /* Want a block device. Probably not /dev/hda or /dev/hdb. */ if (!S_ISBLK(statbuf.st_mode)) check=0; -- 1.7.1 -- 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