From f4e683fc6bd6ac76f9979f49d737588b6ddf16b0 Mon Sep 17 00:00:00 2001
From: gcontini <1121667+gcontini@users.noreply.github.com>
Date: 周六, 14 11月 2020 22:13:13 +0800
Subject: [PATCH] windows smbios

---
 src/templates/licensecc_properties.h.in |   22 ++++++++++++++--------
 1 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/src/templates/licensecc_properties.h.in b/src/templates/licensecc_properties.h.in
index 55c22a2..1dd89e8 100644
--- a/src/templates/licensecc_properties.h.in
+++ b/src/templates/licensecc_properties.h.in
@@ -51,7 +51,7 @@
 #define LCC_API_AUDIT_EVENT_NUM 5
 #define LCC_API_AUDIT_EVENT_PARAM2 255
 #define LCC_API_VERSION_LENGTH 15
-#define LCC_API_PROJECT_NAME_SIZE 15
+#define LCC_API_FEATURE_NAME_SIZE 15
 #define LCC_API_EXPIRY_DATE_SIZE 10
 #define LCC_API_ERROR_BUFFER_SIZE 256
 
@@ -78,8 +78,9 @@
 enum LCC_API_HW_IDENTIFICATION_STRATEGY {
 	/**
 	 * \brief Default strategy.
-	 *
-	 * This strategy try to detect which virtual environment the software is running in.
+	 * 
+	 * This strategy first checks the content of the environment variable `IDENTIFICATION_STRATEGY`. If the variable is defined it will use the 
+	 * strategy specified in there, if not defined it will try to detect which virtual environment the software is running in.
 	 *  - If no virtual environment is detected it will try the strategies defined in ::LCC_BARE_TO_METAL_STRATEGIES
 	 *  - If it detects the software is running in a virtual machine it will use ::LCC_VM_STRATEGIES
 	 *  - If it detects the software is running in a docker or in an LXC it will use ::LCC_DOCKER_STRATEGIES or
@@ -89,10 +90,15 @@
 	STRATEGY_DEFAULT = -1,
 	STRATEGY_ETHERNET = 0,
 	STRATEGY_IP_ADDRESS = 1,
-	STRATEGY_DISK_NUM = 2,
-	STRATEGY_DISK_LABEL = 3,
-	STRATEGY_MEMORY_CPU_SIZE = 4,
-	STRATEGY_HOST_NAME = 5,
+	STRATEGY_DISK = 2,
+	/**
+	* Not yet implemented
+	*/
+	STRATEGY_CPU_SIZE = 3,
+	/**
+	* Not yet implemented
+	*/
+	STRATEGY_HOST_NAME = 4,
 	STRATEGY_NONE = -2
 };
 
@@ -103,7 +109,7 @@
 /**
  * List the strategies used when no virtual envrionment is detected
  */
-#define LCC_BARE_TO_METAL_STRATEGIES { STRATEGY_ETHERNET, STRATEGY_DISK_LABEL, STRATEGY_NONE }
+#define LCC_BARE_TO_METAL_STRATEGIES { STRATEGY_DISK, STRATEGY_HOST_NAME, STRATEGY_NONE }
 /**
  * List the strategies used when the software is executing in a virtual machine
  */

--
Gitblit v1.9.1