From 08ba1b447205913a1979143d9bf3b6afbdc5c742 Mon Sep 17 00:00:00 2001 From: Petr Rockai Date: Mon, 15 Oct 2012 12:44:19 +0200 Subject: [PATCH] lvmetad: Only print scanning messages when scanning 1 device. --- lib/cache/lvmetad.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/cache/lvmetad.c b/lib/cache/lvmetad.c index f7d250e5c..6a374ac04 100644 --- a/lib/cache/lvmetad.c +++ b/lib/cache/lvmetad.c @@ -871,6 +871,7 @@ int lvmetad_pvscan_all_devs(struct cmd_context *cmd, activation_handler handler) daemon_reply reply; int r = 1; char *future_token; + int was_silent; if (!(iter = dev_iter_create(cmd->lvmetad_filter, 1))) { log_error("dev_iter creation failed"); @@ -890,6 +891,9 @@ int lvmetad_pvscan_all_devs(struct cmd_context *cmd, activation_handler handler) r = 0; daemon_reply_destroy(reply); + was_silent = silent_mode(); + init_silent(1); + while ((dev = dev_iter_get(iter))) { if (!lvmetad_pvscan_single(cmd, dev, handler)) r = 0; @@ -898,6 +902,8 @@ int lvmetad_pvscan_all_devs(struct cmd_context *cmd, activation_handler handler) break; } + init_silent(was_silent); + dev_iter_destroy(iter); _lvmetad_token = future_token;