[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] swapon: add -v, --verbose argument
From: |
Justus Winter |
Subject: |
[PATCH] swapon: add -v, --verbose argument |
Date: |
Fri, 5 Jul 2013 11:19:32 +0200 |
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(+)
diff --git a/sutils/swapon.c b/sutils/swapon.c
index 03b17de..2403f1c 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
--
1.7.10.4
- [PATCH] swapon: add -v, --verbose argument,
Justus Winter <=