diff options
author | Justus Winter <4winter@informatik.uni-hamburg.de> | 2013-07-05 11:19:32 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2013-07-06 22:43:44 +0200 |
commit | 272cf0e4d15d927b692387d17c4cfa35d023ae63 (patch) | |
tree | d12bc4ac1b53008bdd645db14bb672caa91e51da /sutils/swapon.c | |
parent | d1c0b2c7122f1062c44c5be8d4b4ed55ffb0b3ac (diff) |
swapon: add -v, --verbose argument
This patch adds a --verbose argument to swapon and swapoff to make it
more compatible with the corresponding Linux' utilities. Note that our
swapon is verbose by default and has a --quiet argument to make it
quiet, so a --verbose argument on it's own does nothing at all.
* sutils/swapon.c (main): Handle -v argument.
Diffstat (limited to 'sutils/swapon.c')
-rw-r--r-- | sutils/swapon.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sutils/swapon.c b/sutils/swapon.c index 03b17de8..2403f1c2 100644 --- a/sutils/swapon.c +++ b/sutils/swapon.c @@ -56,6 +56,7 @@ static struct argp_option options[] = "Require a Linux swap signature page"}, {"silent", 'q', 0, 0, "Print only diagnostic messages"}, {"quiet", 'q', 0, OPTION_ALIAS | OPTION_HIDDEN }, + {"verbose", 'v', 0, 0, "Be verbose"}, {0, 0} }; static char *args_doc = "DEVICE..."; @@ -490,6 +491,10 @@ main (int argc, char *argv[]) quiet = 1; break; + case 'v': + quiet = 0; + break; + case ARGP_KEY_ARG: #ifdef SWAPOFF #define ONOFF 0 |