]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Changes to common header files not applicable to open-vm-tools.
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 7381ba88357df894ba88db6230caad24b4bc0101..55e71ab819d238f3e04761c2a7094b5f9b98c392 100644 (file)
@@ -94,34 +94,6 @@ 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);
@@ -489,6 +461,8 @@ typedef Bool (GetOpId)(size_t maxStringLen,
 
 void Log_RegisterOpIdFunction(GetOpId *getOpIdFunc);
 
+void Log_LoadModuleFilters(struct CfgInterface *cfgIf);
+
 #endif /* !VMM */
 
 #if defined(__cplusplus)
@@ -496,3 +470,39 @@ void Log_RegisterOpIdFunction(GetOpId *getOpIdFunc);
 #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 f94faa0da15d988b96c02c3218c18ae86123eefb..1ea485bad58cfd93dbc4664ef930ea02f604cdc0 100644 (file)
@@ -27,8 +27,6 @@
 /* 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 */ \