From 272cf0e4d15d927b692387d17c4cfa35d023ae63 Mon Sep 17 00:00:00 2001 From: Justus Winter <4winter@informatik.uni-hamburg.de> Date: Fri, 5 Jul 2013 11:19:32 +0200 Subject: 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. --- sutils/swapon.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sutils/swapon.c') 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 -- cgit v1.2.3