[PATCH 6/6] Always put watchdog in the config structure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Only multipathd and libmultipath ever get compiled with USE_SYSTEMD
enabled. If the watchdog variable is only in the config structure when
USE_SYSTEMD is enabled, it means that the multipath and libmultipath
code have different views of the config structure. This causes all sorts
of errors when multipath calls a libmultipath function.

The other alternative would be to leave the preprocessor #ifdef and
make sure to compile all tools with

CFLAGS += -DUSE_SYSTEMD=$(SYSTEMD)

Removing the #ifdef in the config structure means we don't have to worry
about this mistake happening again in the future, and only takes up 8
extra bytes in the structure.

Signed-off-by: Benjamin Marzinski <bmarzins@xxxxxxxxxx>
---
 libmultipath/config.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/libmultipath/config.h b/libmultipath/config.h
index 2097879..5b6d107 100644
--- a/libmultipath/config.h
+++ b/libmultipath/config.h
@@ -110,9 +110,7 @@ struct config {
 	int ignore_wwids;
 	int checker_timeout;
 	int daemon;
-#ifdef USE_SYSTEMD
 	int watchdog;
-#endif
 	int flush_on_last_del;
 	int attribute_flags;
 	int fast_io_fail;
-- 
1.8.3.1

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel




[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux