]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Back out earlier common header file changes.
authorJohn Wolfe <jwolfe@vmware.com>
Fri, 11 Sep 2020 19:11:04 +0000 (12:11 -0700)
committerJohn Wolfe <jwolfe@vmware.com>
Fri, 11 Sep 2020 19:11:04 +0000 (12:11 -0700)
open-vm-tools/lib/include/log.h
open-vm-tools/lib/include/loglevel_userVars.h

index 55e71ab819d238f3e04761c2a7094b5f9b98c392..7381ba88357df894ba88db6230caad24b4bc0101 100644 (file)
@@ -94,6 +94,34 @@ typedef enum {
 #define VMW_LOG_LEVEL(routing)  ((routing) & VMW_LOG_LEVEL_MASK)
 #define VMW_LOG_MODULE(routing) (((routing) >> VMW_LOG_LEVEL_BITS))
 
+/*
+ * To use the Log Facility module specific filters:
+ *
+ *  1) Use LogV or Log_Level and use the LOG_ROUTING_BITS macro.
+ *
+ *  2) Have LOGLEVEL_MODULE defined before the include of "log.h".
+ *
+ *     For many files, this involves moving the include "log.h" after
+ *     the include of "loglevel_user.h".
+ */
+
+#if defined(LOGLEVEL_MODULE)
+   #include "loglevel_userVars.h"
+   #include "vm_basic_defs.h"
+
+   #define LOGFACILITY_MODULEVAR(mod) XCONC(_logFacilityModule_, mod)
+
+   enum LogFacilityModuleValue {
+      LOGLEVEL_USER(LOGFACILITY_MODULEVAR)
+   };
+
+   /* Module bits of zero (0) indicate no module has been specified */
+   #define LOG_ROUTING_BITS(level) \
+      (((LOGFACILITY_MODULEVAR(LOGLEVEL_MODULE) + 1) << VMW_LOG_LEVEL_BITS) | level)
+#else
+   #define LOG_ROUTING_BITS(level) (level)
+#endif
+
 void LogV(uint32 routing,
           const char *fmt,
           va_list args);
@@ -461,8 +489,6 @@ typedef Bool (GetOpId)(size_t maxStringLen,
 
 void Log_RegisterOpIdFunction(GetOpId *getOpIdFunc);
 
-void Log_LoadModuleFilters(struct CfgInterface *cfgIf);
-
 #endif /* !VMM */
 
 #if defined(__cplusplus)
@@ -470,39 +496,3 @@ void Log_LoadModuleFilters(struct CfgInterface *cfgIf);
 #endif
 
 #endif /* VMWARE_LOG_H */
-
-/*
- * To use the Log Facility module specific filters:
- *
- *  1) Use LogV or Log_Level and use the LOG_ROUTING_BITS macro.
- *
- *  2) Have LOGLEVEL_MODULE defined before the include of "log.h".
- *
- *     For many files, this involves moving the include "log.h" after
- *     the include of "loglevel_user.h".
- */
-
-#if !defined(VMW_LOG_MODULE_LEVELS)
-   #include "vm_basic_defs.h"
-   #include "loglevel_userVars.h"
-
-   #define LOGFACILITY_MODULEVAR(mod) XCONC(_logFacilityModule_, mod)
-
-   enum LogFacilityModuleValue {
-      LOGLEVEL_USER(LOGFACILITY_MODULEVAR)
-   };
-
-   #define VMW_LOG_MODULE_LEVELS
-#endif
-
-#if defined(LOG_ROUTING_BITS)
-   #undef LOG_ROUTING_BITS
-#endif
-
-#if defined(LOGLEVEL_MODULE)
-   /* Module bits of zero (0) indicate no module has been specified */
-   #define LOG_ROUTING_BITS(level) \
-      (((LOGFACILITY_MODULEVAR(LOGLEVEL_MODULE) + 1) << VMW_LOG_LEVEL_BITS) | level)
-#else
-   #define LOG_ROUTING_BITS(level) (level)
-#endif
index 1ea485bad58cfd93dbc4664ef930ea02f604cdc0..f94faa0da15d988b96c02c3218c18ae86123eefb 100644 (file)
@@ -27,6 +27,8 @@
 /* KEEP IN SORTED ORDER! */
 
 #define LOGLEVEL_USER(LOGLEVEL_VAR) \
+   /* main has to be first. */ \
+   LOGLEVEL_VAR(main), \
    LOGLEVEL_VAR(acpi), \
    LOGLEVEL_VAR(acpiGPE), \
    LOGLEVEL_VAR(ahci), \
    LOGLEVEL_VAR(macfilter), \
    LOGLEVEL_VAR(machPoll), \
    LOGLEVEL_VAR(maclatency), \
-   LOGLEVEL_VAR(main), \
    LOGLEVEL_VAR(mainMem), \
    LOGLEVEL_VAR(mainMemReplayCheck), \
    LOGLEVEL_VAR(masReceipt), /* lib/masReceipt */ \