diff options
author | Andrew Boie <andrew.p.boie@intel.com> | 2014-01-23 17:37:22 -0800 |
---|---|---|
committer | Xiaokang Qin <xiaokang.qin@intel.com> | 2014-04-30 12:57:45 +0800 |
commit | c82b8d217dea3bcb04ed1906a7cd0303eb15df57 (patch) | |
tree | c6ff8183fec43f4e008ea882a7ceff32aae0f900 | |
parent | f3661cc2f124bb7ca38285f156c624dda974b4c5 (diff) | |
download | system_core-c82b8d217dea3bcb04ed1906a7cd0303eb15df57.zip system_core-c82b8d217dea3bcb04ed1906a7cd0303eb15df57.tar.gz system_core-c82b8d217dea3bcb04ed1906a7cd0303eb15df57.tar.bz2 |
toolbox: indicate why swap{on|off} failed
Change-Id: I1247e3592ab0f9878fb27d114fd14f9b29282b0e
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
-rw-r--r-- | toolbox/swapoff.c | 2 | ||||
-rw-r--r-- | toolbox/swapon.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/toolbox/swapoff.c b/toolbox/swapoff.c index d8f6a00..477494e 100644 --- a/toolbox/swapoff.c +++ b/toolbox/swapoff.c @@ -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; diff --git a/toolbox/swapon.c b/toolbox/swapon.c index 21d2287..c060104 100644 --- a/toolbox/swapon.c +++ b/toolbox/swapon.c @@ -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; |