[PATCH 04/10] vsh: Introduce simple version of VSH_ALTERNATIVE_OPTIONS_EXPR

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

 



VSH_ALTERNATIVE_OPTIONS takes just the name of the options instead of
requiring also the getter functions.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 tools/vsh.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tools/vsh.h b/tools/vsh.h
index 377c5947c1..2a1be29b1c 100644
--- a/tools/vsh.h
+++ b/tools/vsh.h
@@ -551,6 +551,10 @@ void vshReadlineHistoryAdd(const char *cmd);
         } \
     } while (0)

+#define VSH_ALTERNATIVE_OPTIONS(NAME1, NAME2) \
+    VSH_ALTERNATIVE_OPTIONS_EXPR(NAME1, vshCommandOptBool(cmd, NAME1), \
+                                 NAME2, vshCommandOptBool(cmd, NAME2))
+
 /* Macros to help dealing with required options. */

 /* VSH_REQUIRE_OPTION_EXPR:
-- 
2.43.0
_______________________________________________
Devel mailing list -- devel@xxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxx




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux