mkswap: add alignment check
This patch produces the program to warn if the given device is misaligned. [kzak@redhat.com: - call the check for block devices only] Signed-off-by: Davidlohr Bueso <dave@gnu.org> Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
parent
ba32692970
commit
95fa64da98
|
@ -599,6 +599,8 @@ main(int argc, char **argv) {
|
|||
errx(EXIT_FAILURE, _("error: "
|
||||
"%s is mounted; will not make swapspace."),
|
||||
device_name);
|
||||
else if (blkdev_is_misaligned(DEV))
|
||||
warnx(_("warning: %s is misaligned"), device_name);
|
||||
|
||||
if (check)
|
||||
check_blocks();
|
||||
|
|
Loading…
Reference in New Issue