]> sourceware.org Git - lvm2.git/commitdiff
Don't really change monitoring status when in test mode.
authorAlasdair Kergon <agk@redhat.com>
Mon, 16 Aug 2010 23:29:09 +0000 (23:29 +0000)
committerAlasdair Kergon <agk@redhat.com>
Mon, 16 Aug 2010 23:29:09 +0000 (23:29 +0000)
WHATS_NEW
lib/activate/activate.c

index 05b19e098899516bf7a02c0dda6686ba315ee27a..ffacab7c56aa4d2b42fbb3bde83500e5259a2515 100644 (file)
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
 Version 2.02.73 - 
 ================================
+  Don't really change monitoring status when in test mode.
   Fix some exit statuses when starting/stopping monitoring fails.
   Enable snapshot monitoring by default when dmeventd is enabled.
   Move cloned libdevmapper-event client code from segments into lib/activate.
index 0e0bd8b8bd305cba0453d27ff4b272b183efabfe..68ddfefaaf047308739174ecca46d4f60aa52516 100644 (file)
@@ -940,7 +940,12 @@ int monitor_dev_for_events(struct cmd_context *cmd,
                if (!monitor_fn)
                        continue;
 
-               log_verbose("%sonitoring %s/%s", monitor ? "M" : "Not m", lv->vg->name, lv->name);
+               log_verbose("%sonitoring %s/%s%s", monitor ? "M" : "Not m", lv->vg->name, lv->name,
+                           test_mode() ? " [Test mode: skipping this]" : "");
+
+               /* FIXME Test mode should really continue a bit further. */
+               if (test_mode())
+                       continue;
 
                /* FIXME specify events */
                if (!monitor_fn(seg, 0)) {
@@ -964,7 +969,8 @@ int monitor_dev_for_events(struct cmd_context *cmd,
                        sleep(1);
                }
 
-               r = (monitored && monitor) || (!monitored && !monitor);
+               if (r)
+                       r = (monitored && monitor) || (!monitored && !monitor);
        }
 
        return r;
This page took 0.047021 seconds and 5 git commands to generate.