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:
parent
f3661cc2f1
commit
c82b8d217d
2 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue