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/vgrename.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools/vgrename.c') diff --git a/tools/vgrename.c b/tools/vgrename.c index 56031ec9..451d0854 100644 --- a/tools/vgrename.c +++ b/tools/vgrename.c @@ -177,8 +177,8 @@ static int vg_rename_path(struct cmd_context *cmd, const char *old_vg_path, unlock_vg(cmd, vg_name_new); unlock_and_release_vg(cmd, vg, vg_name_old); - log_print("Volume group \"%s\" successfully renamed to \"%s\"", - vg_name_old, vg_name_new); + log_print_unless_silent("Volume group \"%s\" successfully renamed to \"%s\"", + vg_name_old, vg_name_new); /* FIXME lvmcache corruption - vginfo duplicated instead of renamed */ persistent_filter_wipe(cmd->filter); -- cgit