]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
RpcVMX: Report driver name and driver version to vmx to store the key-value in
authorOliver Kurth <okurth@vmware.com>
Tue, 5 Dec 2017 00:27:20 +0000 (16:27 -0800)
committerOliver Kurth <okurth@vmware.com>
Tue, 5 Dec 2017 00:27:20 +0000 (16:27 -0800)
GuestVars, and write a log in vmware.log using RpcVMX_Log.

open-vm-tools/lib/include/rpcvmx.h
open-vm-tools/lib/rpcVmx/rpcvmx.c

index 8fa6d1dbb0198e27b68b39b7f7170dc89dcefc5a..efc371f7cfe86da2ea226e2eb7e57df38e16ccdc 100644 (file)
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 2004-2016 VMware, Inc. All rights reserved.
+ * Copyright (C) 2004-2017 VMware, Inc. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published
@@ -77,5 +77,11 @@ int32 RpcVMX_ConfigGetLong(int32 defval, const char *key);
  */
 Bool RpcVMX_ConfigGetBool(Bool defval, const char *key);
 
+/*
+ * Report driver name and driver version to vmx to store the key-value in
+ * GuestVars, and write a log in vmware.log using RpcVMX_Log.
+ */
+void RpcVMX_ReportDriverVersion(const char *drivername, const char *versionString);
+
 #endif /* _VMXRPC_H_ */
 
index f215c37a52603830479d88b01eec2e475cd5374b..b976cbbb4a77ac91a502ea5b44b8baf96c0b28db 100644 (file)
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 2004-2016 VMware, Inc. All rights reserved.
+ * Copyright (C) 2004-2017 VMware, Inc. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published
@@ -292,3 +292,31 @@ RpcVMX_ConfigGetLong(int32 defval, const char *var)
    return ret;
 }
 
+
+/*
+ *----------------------------------------------------------------------------
+ *
+ * RpcVMX_ReportDriverVersion --
+ *
+ *      Report driver name and driver version to vmx to store the key-value in
+ *      GuestVars, and write a log in vmware.log using RpcVMX_Log.
+ *
+ * Results:
+ *      None.
+ *
+ * Side effects:
+ *      None.
+ *
+ *----------------------------------------------------------------------------
+ */
+
+void
+RpcVMX_ReportDriverVersion(const char *drivername, const char *versionString)
+{
+   char setVersionCmd[128];
+   Str_Sprintf(setVersionCmd, sizeof(setVersionCmd),
+               "info-set guestinfo.driver.%s.version %s",
+               drivername, versionString);
+   RpcOut_sendOne(NULL, NULL, setVersionCmd);
+   RpcVMX_Log("Driver=%s, Version=%s", drivername, versionString);
+}