diff mbox series

[16/22] tools/utils: move XLU_Operation to libxlu_cfg_y.h

Message ID d7b9af537aa1c56189c98aa61589e2226af86d6e.1690990428.git.ehem+xen@m5p.com (mailing list archive)
State New, archived
Headers show
Series Cleanup and splitting of xl.cfg parsing | expand

Commit Message

Elliott Mitchell July 9, 2023, 11:06 p.m. UTC
This enumerated value is never used outside of the lowest layer of the
configuration parser.  As such, move to the internal header.

Fixes: a30910bfd7 ("libxlu: Handle += in config files")
Signed-off-by: Elliott Mitchell <ehem+xen@m5p.com>
---
I'm unsure whether this is fixing a30910bfd7.  Placing XLU_Operation in
libxlutil.h was certainly erroneous, but it is quite unlikely to directly
result in actual bugs.
---
 tools/include/libxlutil.h      | 5 -----
 tools/libs/util/libxlu_cfg_y.y | 5 +++++
 2 files changed, 5 insertions(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/tools/include/libxlutil.h b/tools/include/libxlutil.h
index 0ce66c2096..de57ca4200 100644
--- a/tools/include/libxlutil.h
+++ b/tools/include/libxlutil.h
@@ -25,11 +25,6 @@  enum XLU_ConfigValueType {
     XLU_LIST,
 };
 
-enum XLU_Operation {
-    XLU_OP_ASSIGNMENT = 0,
-    XLU_OP_ADDITION,
-};
-
 /* Unless otherwise stated, all functions return an errno value. */
 typedef struct XLU_Config XLU_Config;
 typedef struct XLU_ConfigList XLU_ConfigList;
diff --git a/tools/libs/util/libxlu_cfg_y.y b/tools/libs/util/libxlu_cfg_y.y
index 75e7140478..5dfb06941a 100644
--- a/tools/libs/util/libxlu_cfg_y.y
+++ b/tools/libs/util/libxlu_cfg_y.y
@@ -27,6 +27,11 @@  typedef struct {
 }
 
 %code provides {
+enum XLU_Operation {
+    XLU_OP_ASSIGNMENT = 0,
+    XLU_OP_ADDITION,
+};
+
 void xlu__cfg_set_free(XLU_ConfigSetting *set);
 void xlu__cfg_set_store(CfgParseContext*, char *name,
                         enum XLU_Operation op,