From 438e0050dfed1f8f2d74670a5f7c5e8c8819c777 Mon Sep 17 00:00:00 2001 From: Alasdair G Kergon Date: Sat, 25 Aug 2012 20:35:48 +0100 Subject: config: add silent mode Accept -q as the short form of --quiet. Suppress non-essential standard output if -q is given twice. Treat log/silent in lvm.conf as equivalent to -qq. Review all log_print messages and change some to log_print_unless_silent. When silent, the following commands still produce output: dumpconfig, lvdisplay, lvmdiskscan, lvs, pvck, pvdisplay, pvs, version, vgcfgrestore -l, vgdisplay, vgs. [Needs checking.] Non-essential messages are shifted from log level 4 to log level 5 for syslog and lvm2_log_fn purposes. --- tools/pvremove.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools/pvremove.c') diff --git a/tools/pvremove.c b/tools/pvremove.c index 7d057584..823c069d 100644 --- a/tools/pvremove.c +++ b/tools/pvremove.c @@ -131,8 +131,8 @@ static int pvremove_single(struct cmd_context *cmd, const char *pv_name, if (!lvmetad_pv_gone_by_dev(dev, NULL)) goto_out; - log_print("Labels on physical volume \"%s\" successfully wiped", - pv_name); + log_print_unless_silent("Labels on physical volume \"%s\" successfully wiped", + pv_name); ret = ECMD_PROCESSED; -- cgit