]> sourceware.org Git - lvm2.git/commitdiff
lvmetad: Only print scanning messages when scanning 1 device.
authorPetr Rockai <prockai@redhat.com>
Mon, 15 Oct 2012 10:44:19 +0000 (12:44 +0200)
committerPetr Rockai <prockai@redhat.com>
Mon, 15 Oct 2012 10:45:50 +0000 (12:45 +0200)
lib/cache/lvmetad.c

index f7d250e5cc17471246fd0af34fb75e822ec73780..6a374ac044a9daa199c943728ca72832d0b3de91 100644 (file)
@@ -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;
This page took 0.040139 seconds and 5 git commands to generate.