From 27e8dc084aebdb6d71c67fd2d2000e17f072b7a9 Mon Sep 17 00:00:00 2001
From: Gabriele Contini <contini.mailing@gmail.com>
Date: 周日, 09 2月 2020 05:13:24 +0800
Subject: [PATCH] minor fix

---
 src/library/os/cpu_info.hpp |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/src/library/os/cpu_info.hpp b/src/library/os/cpu_info.hpp
index 716ca40..04da89b 100644
--- a/src/library/os/cpu_info.hpp
+++ b/src/library/os/cpu_info.hpp
@@ -10,10 +10,15 @@
 #include <string>
 namespace license {
 
+typedef enum { BARE_TO_METAL, VMWARE, VIRTUALBOX, V_XEN, KVM, HV, V_OTHER } VIRTUALIZATION_DETAIL;
+
 /**
  * Cpu informations
  */
 class CpuInfo {
+private:
+	bool is_hypervisor_set() const;
+
 public:
 	CpuInfo();
 	virtual ~CpuInfo();
@@ -22,8 +27,9 @@
 	 * @return true if the cpu is detected to be a virtual cpu
 	 */
 	bool cpu_virtual() const;
-	uint32_t model();
+	uint32_t model() const;
 	std::string vendor() const;
+	VIRTUALIZATION_DETAIL getVirtualizationDetail() const;
 };
 
 } /* namespace license */

--
Gitblit v1.9.1