toolbox: indicate why swap{on|off} failed

Change-Id: I1247e3592ab0f9878fb27d114fd14f9b29282b0e
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
Andrew Boie 2014-01-23 17:37:22 -08:00 committed by Xiaokang Qin
parent f3661cc2f1
commit c82b8d217d
2 changed files with 2 additions and 2 deletions

View file

@ -13,7 +13,7 @@ int swapoff_main(int argc, char **argv)
err = swapoff(argv[1]);
if (err) {
fprintf(stderr, "swapoff failed for %s\n", argv[1]);
fprintf(stderr, "swapoff failed for %s: %s\n", argv[1], strerror(errno));
}
return err;

View file

@ -59,7 +59,7 @@ int swapon_main(int argc, char **argv)
err = swapon(argv[argc - 1], flags);
if (err) {
fprintf(stderr, "swapon failed for %s\n", argv[argc - 1]);
fprintf(stderr, "swapon failed for %s: %s\n", argv[argc - 1], strerror(errno));
}
return err;