1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-02 01:18:26 +03:00

lvmetad: Only print scanning messages when scanning 1 device.

This commit is contained in:
Petr Rockai 2012-10-15 12:44:19 +02:00
parent 78dafcba99
commit 08ba1b4472

6
lib/cache/lvmetad.c vendored
View File

@ -871,6 +871,7 @@ int lvmetad_pvscan_all_devs(struct cmd_context *cmd, activation_handler handler)
daemon_reply reply; daemon_reply reply;
int r = 1; int r = 1;
char *future_token; char *future_token;
int was_silent;
if (!(iter = dev_iter_create(cmd->lvmetad_filter, 1))) { if (!(iter = dev_iter_create(cmd->lvmetad_filter, 1))) {
log_error("dev_iter creation failed"); log_error("dev_iter creation failed");
@ -890,6 +891,9 @@ int lvmetad_pvscan_all_devs(struct cmd_context *cmd, activation_handler handler)
r = 0; r = 0;
daemon_reply_destroy(reply); daemon_reply_destroy(reply);
was_silent = silent_mode();
init_silent(1);
while ((dev = dev_iter_get(iter))) { while ((dev = dev_iter_get(iter))) {
if (!lvmetad_pvscan_single(cmd, dev, handler)) if (!lvmetad_pvscan_single(cmd, dev, handler))
r = 0; r = 0;
@ -898,6 +902,8 @@ int lvmetad_pvscan_all_devs(struct cmd_context *cmd, activation_handler handler)
break; break;
} }
init_silent(was_silent);
dev_iter_destroy(iter); dev_iter_destroy(iter);
_lvmetad_token = future_token; _lvmetad_token = future_token;