diff options
author | Randy MacLeod <Randy.MacLeod@windriver.com> | 2021-04-14 13:50:00 -0400 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2021-04-15 09:28:44 -0700 |
commit | 7a5fbd9d46cdec887d7b370f567e740e7731bfec (patch) | |
tree | b8a1a97bf33d9541f8db9e4d1d67dec45f2df403 /meta-networking/recipes-support/open-vm-tools | |
parent | e1c894d6876c439e362e761176b09f863ee2c689 (diff) | |
download | meta-openembedded-7a5fbd9d46cdec887d7b370f567e740e7731bfec.tar.gz |
open-vm-tools: upgrade 11.0.1 -> 11.2.5
Drop 0001-GitHub-Issue-367.-Remove-references-to-deprecated-G_.patch
since it was a backport.
Drop 0001-pollGtk-Drop-volatile-qualifier.patch
since it's covered by:
f48efc8e Make pollGtk resetable.
Drop 0001-utilBacktrace-Ignore-Warray-bounds.patch
since it's covered by:
0cfda58a Make peeking back into the stack work for back traces
Drop 0002-add-include-sys-sysmacros.h.patch
since it's covered by:
69b7e1f9 Include sysmacros.h directly as mandated by glibc-2.25.
Refit:
0005-Use-configure-to-test-for-feature-instead-of-platfor.patch
0009-Rename-poll.h-to-vm_poll.h.patch
0002-hgfsServerLinux-Consider-64bit-time_t-possibility.patch
0011-Use-uintmax_t-for-handling-rlim_t.patch
Add:
0001-Add-resolv_compat.h-for-musl-builds.patch
Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
Signed-off-by: Trevor Gamblin <Trevor.Gamblin@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-networking/recipes-support/open-vm-tools')
10 files changed, 184 insertions, 907 deletions
diff --git a/meta-networking/recipes-support/open-vm-tools/open-vm-tools/0001-Add-resolv_compat.h-for-musl-builds.patch b/meta-networking/recipes-support/open-vm-tools/open-vm-tools/0001-Add-resolv_compat.h-for-musl-builds.patch new file mode 100644 index 000000000..aa7a5607c --- /dev/null +++ b/meta-networking/recipes-support/open-vm-tools/open-vm-tools/0001-Add-resolv_compat.h-for-musl-builds.patch | |||
@@ -0,0 +1,72 @@ | |||
1 | From c0c36ba5dd7047710e4c3135f147ce4119021200 Mon Sep 17 00:00:00 2001 | ||
2 | From: Trevor Gamblin <trevor.gamblin@windriver.com> | ||
3 | Date: Wed, 14 Apr 2021 10:24:52 -0400 | ||
4 | Subject: [PATCH] Add resolv_compat.h for musl builds | ||
5 | |||
6 | musl doesn't implement res_ninit, so it needs to be defined | ||
7 | independently for musl builds. This patch is based on the one at | ||
8 | https://gitweb.gentoo.org/proj/musl.git/tree/dev-qt/qtwebengine/files/qtwebengine-5.7.0-musl-resolver.patch?id=7f4100326793d55d45d0f5bb6178827ce6173513 | ||
9 | |||
10 | Upstream-Status: Pending | ||
11 | |||
12 | Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com> | ||
13 | --- | ||
14 | open-vm-tools/lib/nicInfo/nicInfoPosix.c | 4 +++ | ||
15 | open-vm-tools/lib/nicInfo/resolv_compat.h | 30 +++++++++++++++++++++++ | ||
16 | 2 files changed, 34 insertions(+) | ||
17 | create mode 100644 open-vm-tools/lib/nicInfo/resolv_compat.h | ||
18 | |||
19 | diff --git a/open-vm-tools/lib/nicInfo/nicInfoPosix.c b/open-vm-tools/lib/nicInfo/nicInfoPosix.c | ||
20 | index 8710c542..25f3146e 100644 | ||
21 | --- a/open-vm-tools/lib/nicInfo/nicInfoPosix.c | ||
22 | +++ b/open-vm-tools/lib/nicInfo/nicInfoPosix.c | ||
23 | @@ -70,6 +70,10 @@ | ||
24 | # include <net/if.h> | ||
25 | #endif | ||
26 | |||
27 | +#if !defined(__GLIBC__) | ||
28 | +#include "resolv_compat.h" | ||
29 | +#endif | ||
30 | + | ||
31 | /* | ||
32 | * resolver(3) and IPv6: | ||
33 | * | ||
34 | diff --git a/open-vm-tools/lib/nicInfo/resolv_compat.h b/open-vm-tools/lib/nicInfo/resolv_compat.h | ||
35 | new file mode 100644 | ||
36 | index 00000000..d768464b | ||
37 | --- /dev/null | ||
38 | +++ b/open-vm-tools/lib/nicInfo/resolv_compat.h | ||
39 | @@ -0,0 +1,30 @@ | ||
40 | +#if !defined(__GLIBC__) | ||
41 | +/*************************************************************************** | ||
42 | + * resolv_compat.h | ||
43 | + * | ||
44 | + * Mimick GLIBC's res_ninit() and res_nclose() for musl libc | ||
45 | + * Note: res_init() is actually deprecated according to | ||
46 | + * http://docs.oracle.com/cd/E36784_01/html/E36875/res-nclose-3resolv.html | ||
47 | + **************************************************************************/ | ||
48 | +#include <string.h> | ||
49 | + | ||
50 | +static inline int res_ninit(res_state statp) | ||
51 | +{ | ||
52 | + int rc = res_init(); | ||
53 | + if (statp != &_res) { | ||
54 | + memcpy(statp, &_res, sizeof(*statp)); | ||
55 | + } | ||
56 | + return rc; | ||
57 | +} | ||
58 | + | ||
59 | +static inline int res_nclose(res_state statp) | ||
60 | +{ | ||
61 | + if (!statp) | ||
62 | + return -1; | ||
63 | + if (statp != &_res) { | ||
64 | + memset(statp, 0, sizeof(*statp)); | ||
65 | + } | ||
66 | + return 0; | ||
67 | +} | ||
68 | +#endif | ||
69 | + | ||
70 | -- | ||
71 | 2.30.2 | ||
72 | |||
diff --git a/meta-networking/recipes-support/open-vm-tools/open-vm-tools/0001-GitHub-Issue-367.-Remove-references-to-deprecated-G_.patch b/meta-networking/recipes-support/open-vm-tools/open-vm-tools/0001-GitHub-Issue-367.-Remove-references-to-deprecated-G_.patch deleted file mode 100644 index 6cb5dfccc..000000000 --- a/meta-networking/recipes-support/open-vm-tools/open-vm-tools/0001-GitHub-Issue-367.-Remove-references-to-deprecated-G_.patch +++ /dev/null | |||
@@ -1,94 +0,0 @@ | |||
1 | From 6fb28085e867d7c3ef46577d9ff193a185693bcb Mon Sep 17 00:00:00 2001 | ||
2 | From: Oliver Kurth <okurth@vmware.com> | ||
3 | Date: Mon, 30 Sep 2019 16:24:27 -0700 | ||
4 | Subject: [PATCH] GitHub Issue #367. Remove references to deprecated G_INLINE_FUNC. | ||
5 | |||
6 | G_INLINE_FUNC was a work-around for compilers that didn't support | ||
7 | static inline. Change uses of it to static inline. | ||
8 | |||
9 | Upstream-Status: Backport | ||
10 | [https://github.com/vmware/open-vm-tools/commit/89c0d444567eb525e8d083fb564c46d68e96660c] | ||
11 | |||
12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
13 | --- | ||
14 | open-vm-tools/lib/include/vmware/tools/plugin.h | 2 +- | ||
15 | open-vm-tools/lib/include/vmware/tools/threadPool.h | 8 ++++---- | ||
16 | open-vm-tools/lib/include/vmware/tools/utils.h | 9 --------- | ||
17 | 3 files changed, 5 insertions(+), 14 deletions(-) | ||
18 | |||
19 | diff --git a/open-vm-tools/lib/include/vmware/tools/plugin.h b/open-vm-tools/lib/include/vmware/tools/plugin.h | ||
20 | index f9acc6a2..deefd1f3 100644 | ||
21 | --- a/open-vm-tools/lib/include/vmware/tools/plugin.h | ||
22 | +++ b/open-vm-tools/lib/include/vmware/tools/plugin.h | ||
23 | @@ -290,7 +290,7 @@ typedef struct ToolsAppCtx { | ||
24 | * | ||
25 | * @return TRUE if COM is initialized when the function returns. | ||
26 | */ | ||
27 | -G_INLINE_FUNC gboolean | ||
28 | +static inline gboolean | ||
29 | ToolsCore_InitializeCOM(ToolsAppCtx *ctx) | ||
30 | { | ||
31 | if (!ctx->comInitialized) { | ||
32 | diff --git a/open-vm-tools/lib/include/vmware/tools/threadPool.h b/open-vm-tools/lib/include/vmware/tools/threadPool.h | ||
33 | index 3f2082b3..5880fbcf 100644 | ||
34 | --- a/open-vm-tools/lib/include/vmware/tools/threadPool.h | ||
35 | +++ b/open-vm-tools/lib/include/vmware/tools/threadPool.h | ||
36 | @@ -91,7 +91,7 @@ typedef struct ToolsCorePool { | ||
37 | ******************************************************************************* | ||
38 | */ | ||
39 | |||
40 | -G_INLINE_FUNC ToolsCorePool * | ||
41 | +static inline ToolsCorePool * | ||
42 | ToolsCorePool_GetPool(ToolsAppCtx *ctx) | ||
43 | { | ||
44 | ToolsCorePool *pool = NULL; | ||
45 | @@ -123,7 +123,7 @@ ToolsCorePool_GetPool(ToolsAppCtx *ctx) | ||
46 | ******************************************************************************* | ||
47 | */ | ||
48 | |||
49 | -G_INLINE_FUNC guint | ||
50 | +static inline guint | ||
51 | ToolsCorePool_SubmitTask(ToolsAppCtx *ctx, | ||
52 | ToolsCorePoolCb cb, | ||
53 | gpointer data, | ||
54 | @@ -153,7 +153,7 @@ ToolsCorePool_SubmitTask(ToolsAppCtx *ctx, | ||
55 | ******************************************************************************* | ||
56 | */ | ||
57 | |||
58 | -G_INLINE_FUNC void | ||
59 | +static inline void | ||
60 | ToolsCorePool_CancelTask(ToolsAppCtx *ctx, | ||
61 | guint taskId) | ||
62 | { | ||
63 | @@ -197,7 +197,7 @@ ToolsCorePool_CancelTask(ToolsAppCtx *ctx, | ||
64 | ******************************************************************************* | ||
65 | */ | ||
66 | |||
67 | -G_INLINE_FUNC gboolean | ||
68 | +static inline gboolean | ||
69 | ToolsCorePool_StartThread(ToolsAppCtx *ctx, | ||
70 | const gchar *threadName, | ||
71 | ToolsCorePoolCb cb, | ||
72 | diff --git a/open-vm-tools/lib/include/vmware/tools/utils.h b/open-vm-tools/lib/include/vmware/tools/utils.h | ||
73 | index f6574590..a3292d5c 100644 | ||
74 | --- a/open-vm-tools/lib/include/vmware/tools/utils.h | ||
75 | +++ b/open-vm-tools/lib/include/vmware/tools/utils.h | ||
76 | @@ -51,15 +51,6 @@ | ||
77 | # include <sys/time.h> | ||
78 | #endif | ||
79 | |||
80 | - | ||
81 | -/* Work around a glib limitation: it doesn't set G_INLINE_FUNC on Win32. */ | ||
82 | -#if defined(G_PLATFORM_WIN32) | ||
83 | -# if defined(G_INLINE_FUNC) | ||
84 | -# undef G_INLINE_FUNC | ||
85 | -# endif | ||
86 | -# define G_INLINE_FUNC static __inline | ||
87 | -#endif | ||
88 | - | ||
89 | #ifndef ABS | ||
90 | # define ABS(x) (((x) >= 0) ? (x) : -(x)) | ||
91 | #endif | ||
92 | -- | ||
93 | 2.23.0 | ||
94 | |||
diff --git a/meta-networking/recipes-support/open-vm-tools/open-vm-tools/0001-pollGtk-Drop-volatile-qualifier.patch b/meta-networking/recipes-support/open-vm-tools/open-vm-tools/0001-pollGtk-Drop-volatile-qualifier.patch deleted file mode 100644 index adc6571f7..000000000 --- a/meta-networking/recipes-support/open-vm-tools/open-vm-tools/0001-pollGtk-Drop-volatile-qualifier.patch +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | From 7bd280f3cc07208760759c98bbfbac3f9d28f77c Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 5 Mar 2021 08:58:29 -0800 | ||
4 | Subject: [PATCH] pollGtk: Drop volatile qualifier | ||
5 | |||
6 | glib-2.0 has changed the function interfaces as well and do not expect | ||
7 | it to be volatile. GCC 11 complains about it | ||
8 | |||
9 | glib/gatomic.h:112:5: error: argument 2 of '__atomic_load' discards 'volatile' qualifier [-Werror=incompatible-pointer-types] | ||
10 | |||
11 | Upstream-Status: Pending | ||
12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
13 | --- | ||
14 | open-vm-tools/lib/pollGtk/pollGtk.c | 2 +- | ||
15 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
16 | |||
17 | diff --git a/open-vm-tools/lib/pollGtk/pollGtk.c b/open-vm-tools/lib/pollGtk/pollGtk.c | ||
18 | index 6d95bf01..a941e7a7 100644 | ||
19 | --- a/open-vm-tools/lib/pollGtk/pollGtk.c | ||
20 | +++ b/open-vm-tools/lib/pollGtk/pollGtk.c | ||
21 | @@ -1473,7 +1473,7 @@ PollGtkBasicCallback(gpointer data) // IN: The eventEntry | ||
22 | void | ||
23 | Poll_InitGtk(void) | ||
24 | { | ||
25 | - static volatile gsize inited = 0; | ||
26 | + static gsize inited = 0; | ||
27 | |||
28 | static const PollImpl gtkImpl = | ||
29 | { | ||
30 | -- | ||
31 | 2.30.1 | ||
32 | |||
diff --git a/meta-networking/recipes-support/open-vm-tools/open-vm-tools/0001-utilBacktrace-Ignore-Warray-bounds.patch b/meta-networking/recipes-support/open-vm-tools/open-vm-tools/0001-utilBacktrace-Ignore-Warray-bounds.patch deleted file mode 100644 index 95664e855..000000000 --- a/meta-networking/recipes-support/open-vm-tools/open-vm-tools/0001-utilBacktrace-Ignore-Warray-bounds.patch +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | From ac3f93ea087d3a5461fe57fe021d0fe9a959e13c Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 25 Dec 2019 15:25:02 -0800 | ||
4 | Subject: [PATCH] utilBacktrace: Ignore -Warray-bounds | ||
5 | |||
6 | This is new warning with gcc10, until its fixed ignore it like gcc<10 | ||
7 | did | ||
8 | |||
9 | Upstream-Status: Pending | ||
10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
11 | --- | ||
12 | open-vm-tools/lib/user/utilBacktrace.c | 5 +++++ | ||
13 | 1 file changed, 5 insertions(+) | ||
14 | |||
15 | diff --git a/open-vm-tools/lib/user/utilBacktrace.c b/open-vm-tools/lib/user/utilBacktrace.c | ||
16 | index b72340ad..97ca53f2 100644 | ||
17 | --- a/open-vm-tools/lib/user/utilBacktrace.c | ||
18 | +++ b/open-vm-tools/lib/user/utilBacktrace.c | ||
19 | @@ -517,6 +517,11 @@ Util_BacktraceWithFunc(int bugNr, // IN: | ||
20 | } else { | ||
21 | outFunc(outFuncData, "Backtrace for bugNr=%d\n",bugNr); | ||
22 | } | ||
23 | +#pragma GCC diagnostic push | ||
24 | +#pragma GCC diagnostic ignored "-Warray-bounds" | ||
25 | + | ||
26 | Util_BacktraceFromPointerWithFunc(&x[-2], outFunc, outFuncData); | ||
27 | +#pragma GCC diagnostic pop | ||
28 | #endif | ||
29 | } | ||
30 | + | ||
31 | -- | ||
32 | 2.24.1 | ||
33 | |||
diff --git a/meta-networking/recipes-support/open-vm-tools/open-vm-tools/0002-add-include-sys-sysmacros.h.patch b/meta-networking/recipes-support/open-vm-tools/open-vm-tools/0002-add-include-sys-sysmacros.h.patch deleted file mode 100644 index 34628ffbe..000000000 --- a/meta-networking/recipes-support/open-vm-tools/open-vm-tools/0002-add-include-sys-sysmacros.h.patch +++ /dev/null | |||
@@ -1,30 +0,0 @@ | |||
1 | From 3fa237b3afabc293e563292b8d89265a871626ad Mon Sep 17 00:00:00 2001 | ||
2 | From: Martin Kelly <mkelly@xevo.com> | ||
3 | Date: Mon, 22 May 2017 17:00:05 -0700 | ||
4 | Subject: [PATCH] add #include <sys/sysmacros.h> | ||
5 | |||
6 | In newer glibc versions, the definition for major() has been moved to | ||
7 | sys/sysmacros.h, and using the older version in <sys/types.h> has been | ||
8 | deprecated. So, add an include for <sys/sysmacros.h>. | ||
9 | |||
10 | Upstream-Status: Pending | ||
11 | |||
12 | Signed-off-by: Martin Kelly <mkelly@xevo.com> | ||
13 | --- | ||
14 | open-vm-tools/lib/wiper/wiperPosix.c | 3 +++ | ||
15 | 1 file changed, 3 insertions(+) | ||
16 | |||
17 | diff --git a/open-vm-tools/lib/wiper/wiperPosix.c b/open-vm-tools/lib/wiper/wiperPosix.c | ||
18 | index bd542410..ccf06293 100644 | ||
19 | --- a/open-vm-tools/lib/wiper/wiperPosix.c | ||
20 | +++ b/open-vm-tools/lib/wiper/wiperPosix.c | ||
21 | @@ -43,6 +43,9 @@ | ||
22 | # include <libgen.h> | ||
23 | # endif /* __FreeBSD_version >= 500000 */ | ||
24 | #endif | ||
25 | +#if defined(__linux__) | ||
26 | +#include <sys/sysmacros.h> | ||
27 | +#endif | ||
28 | #include <unistd.h> | ||
29 | |||
30 | #include "vmware.h" | ||
diff --git a/meta-networking/recipes-support/open-vm-tools/open-vm-tools/0002-hgfsServerLinux-Consider-64bit-time_t-possibility.patch b/meta-networking/recipes-support/open-vm-tools/open-vm-tools/0002-hgfsServerLinux-Consider-64bit-time_t-possibility.patch index 0f64eabc9..efada7aaf 100644 --- a/meta-networking/recipes-support/open-vm-tools/open-vm-tools/0002-hgfsServerLinux-Consider-64bit-time_t-possibility.patch +++ b/meta-networking/recipes-support/open-vm-tools/open-vm-tools/0002-hgfsServerLinux-Consider-64bit-time_t-possibility.patch | |||
@@ -1,22 +1,27 @@ | |||
1 | From fe56b67a2915a8632ea30604c14241f335dd3c15 Mon Sep 17 00:00:00 2001 | 1 | From deba3b87a9bfad007f94b840c9ccd6f1c78c2e98 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Tue, 12 Nov 2019 10:49:46 -0800 | 3 | Date: Wed, 24 Mar 2021 17:36:26 -0400 |
4 | Subject: [PATCH] hgfsServerLinux: Consider 64bit time_t possibility | 4 | Subject: [PATCH 1/2] hgfsServerLinux: Consider 64bit time_t possibility |
5 | 5 | ||
6 | Upstream-Status: Pending | 6 | Upstream-Status: Pending |
7 | |||
8 | Refit for open-vm-tools-11.2.5. | ||
9 | |||
7 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
11 | Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com> | ||
12 | Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com> | ||
8 | --- | 13 | --- |
9 | .../lib/hgfsServer/hgfsServerLinux.c | 19 +++++-------------- | 14 | .../lib/hgfsServer/hgfsServerLinux.c | 19 +++++-------------- |
10 | 1 file changed, 5 insertions(+), 14 deletions(-) | 15 | 1 file changed, 5 insertions(+), 14 deletions(-) |
11 | 16 | ||
12 | diff --git a/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c b/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c | 17 | diff --git a/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c b/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c |
13 | index 03175623..554da67f 100644 | 18 | index 62aeee6d..ba2e5624 100644 |
14 | --- a/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c | 19 | --- a/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c |
15 | +++ b/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c | 20 | +++ b/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c |
16 | @@ -2561,20 +2561,11 @@ HgfsStatToFileAttr(struct stat *stats, // IN: stat information | 21 | @@ -2566,20 +2566,11 @@ HgfsStatToFileAttr(struct stat *stats, // IN: stat information |
17 | LOG(4, ("%s: done, permissions %o%o%o%o, size %"FMT64"u\n", __FUNCTION__, | 22 | LOG(4, "%s: done, permissions %o%o%o%o, size %"FMT64"u\n", __FUNCTION__, |
18 | attr->specialPerms, attr->ownerPerms, attr->groupPerms, | 23 | attr->specialPerms, attr->ownerPerms, attr->groupPerms, |
19 | attr->otherPerms, attr->size)); | 24 | attr->otherPerms, attr->size); |
20 | -#ifdef __FreeBSD__ | 25 | -#ifdef __FreeBSD__ |
21 | -# if !defined(VM_X86_64) && __FreeBSD_version >= 500043 | 26 | -# if !defined(VM_X86_64) && __FreeBSD_version >= 500043 |
22 | -# define FMTTIMET "" | 27 | -# define FMTTIMET "" |
@@ -26,16 +31,19 @@ index 03175623..554da67f 100644 | |||
26 | -#else | 31 | -#else |
27 | -# define FMTTIMET "l" | 32 | -# define FMTTIMET "l" |
28 | -#endif | 33 | -#endif |
29 | - LOG(4, ("access: %"FMTTIMET"d/%"FMT64"u \nwrite: %"FMTTIMET"d/%"FMT64"u \n" | 34 | - LOG(4, "access: %"FMTTIMET"d/%"FMT64"u \nwrite: %"FMTTIMET"d/%"FMT64"u \n" |
30 | - "attr: %"FMTTIMET"d/%"FMT64"u\n", | 35 | - "attr: %"FMTTIMET"d/%"FMT64"u\n", |
31 | - stats->st_atime, attr->accessTime, stats->st_mtime, attr->writeTime, | 36 | - stats->st_atime, attr->accessTime, stats->st_mtime, attr->writeTime, |
32 | - stats->st_ctime, attr->attrChangeTime)); | 37 | - stats->st_ctime, attr->attrChangeTime); |
33 | -#undef FMTTIMET | 38 | -#undef FMTTIMET |
34 | + LOG(4, ("access: %jd/%"FMT64"u \nwrite: %jd/%"FMT64"u \n" | 39 | + //LOG(4, ("access: %jd/%"FMT64"u \nwrite: %jd/%"FMT64"u \n" |
35 | + "attr: %jd/%"FMT64"u\n", | 40 | + // "attr: %jd/%"FMT64"u\n", |
36 | + (intmax_t)stats->st_atime, attr->accessTime, | 41 | + // (intmax_t)stats->st_atime, attr->accessTime, |
37 | + (intmax_t)stats->st_mtime, attr->writeTime, | 42 | + // (intmax_t)stats->st_mtime, attr->writeTime, |
38 | + (intmax_t)stats->st_ctime, attr->attrChangeTime)); | 43 | + // (intmax_t)stats->st_ctime, attr->attrChangeTime)); |
39 | 44 | ||
40 | attr->userId = stats->st_uid; | 45 | attr->userId = stats->st_uid; |
41 | attr->groupId = stats->st_gid; | 46 | attr->groupId = stats->st_gid; |
47 | -- | ||
48 | 2.30.2 | ||
49 | |||
diff --git a/meta-networking/recipes-support/open-vm-tools/open-vm-tools/0005-Use-configure-to-test-for-feature-instead-of-platfor.patch b/meta-networking/recipes-support/open-vm-tools/open-vm-tools/0005-Use-configure-to-test-for-feature-instead-of-platfor.patch index c6378b808..34d4ce4a9 100644 --- a/meta-networking/recipes-support/open-vm-tools/open-vm-tools/0005-Use-configure-to-test-for-feature-instead-of-platfor.patch +++ b/meta-networking/recipes-support/open-vm-tools/open-vm-tools/0005-Use-configure-to-test-for-feature-instead-of-platfor.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 719d60978f979cf2e03771a9b8a62e36c92639f9 Mon Sep 17 00:00:00 2001 | 1 | From b653a81da70c44af002dcbc7489ad9f4588ed11d Mon Sep 17 00:00:00 2001 |
2 | From: Natanael Copa <ncopa@alpinelinux.org> | 2 | From: Natanael Copa <ncopa@alpinelinux.org> |
3 | Date: Wed, 18 Nov 2015 10:05:07 +0000 | 3 | Date: Wed, 18 Nov 2015 10:05:07 +0000 |
4 | Subject: [PATCH] Use configure to test for feature instead of platform | 4 | Subject: [PATCH] Use configure to test for feature instead of platform |
@@ -18,7 +18,10 @@ The features we test for are: | |||
18 | 18 | ||
19 | This is needed for musl libc. | 19 | This is needed for musl libc. |
20 | 20 | ||
21 | Refit patch of open-vm-tools/lib/nicInfo/nicInfoPosix.c | ||
22 | |||
21 | Signed-off-by: Natanael Copa <ncopa@alpinelinux.org> | 23 | Signed-off-by: Natanael Copa <ncopa@alpinelinux.org> |
24 | Signed-off-by: Randy MacLeod <randy.macleod@windriver.com> | ||
22 | --- | 25 | --- |
23 | open-vm-tools/configure.ac | 4 ++++ | 26 | open-vm-tools/configure.ac | 4 ++++ |
24 | open-vm-tools/lib/misc/idLinux.c | 30 +++++++++++------------- | 27 | open-vm-tools/lib/misc/idLinux.c | 30 +++++++++++------------- |
@@ -26,10 +29,10 @@ Signed-off-by: Natanael Copa <ncopa@alpinelinux.org> | |||
26 | 3 files changed, 23 insertions(+), 17 deletions(-) | 29 | 3 files changed, 23 insertions(+), 17 deletions(-) |
27 | 30 | ||
28 | diff --git a/open-vm-tools/configure.ac b/open-vm-tools/configure.ac | 31 | diff --git a/open-vm-tools/configure.ac b/open-vm-tools/configure.ac |
29 | index 48ff1ef3..71e684bb 100644 | 32 | index 27f3717f..6baab9e3 100644 |
30 | --- a/open-vm-tools/configure.ac | 33 | --- a/open-vm-tools/configure.ac |
31 | +++ b/open-vm-tools/configure.ac | 34 | +++ b/open-vm-tools/configure.ac |
32 | @@ -897,6 +897,7 @@ AC_CHECK_FUNCS( | 35 | @@ -923,6 +923,7 @@ AC_CHECK_FUNCS( |
33 | 36 | ||
34 | AC_CHECK_FUNCS([ecvt]) | 37 | AC_CHECK_FUNCS([ecvt]) |
35 | AC_CHECK_FUNCS([fcvt]) | 38 | AC_CHECK_FUNCS([fcvt]) |
@@ -37,7 +40,7 @@ index 48ff1ef3..71e684bb 100644 | |||
37 | 40 | ||
38 | AC_CHECK_FUNC([mkdtemp], [have_mkdtemp=yes]) | 41 | AC_CHECK_FUNC([mkdtemp], [have_mkdtemp=yes]) |
39 | 42 | ||
40 | @@ -1145,10 +1146,13 @@ fi | 43 | @@ -1132,10 +1133,13 @@ fi |
41 | ### | 44 | ### |
42 | 45 | ||
43 | AC_CHECK_HEADERS([crypt.h]) | 46 | AC_CHECK_HEADERS([crypt.h]) |
@@ -52,7 +55,7 @@ index 48ff1ef3..71e684bb 100644 | |||
52 | AC_CHECK_HEADERS([sys/io.h]) | 55 | AC_CHECK_HEADERS([sys/io.h]) |
53 | AC_CHECK_HEADERS([sys/param.h]) # Required to make the sys/user.h check work correctly on FreeBSD | 56 | AC_CHECK_HEADERS([sys/param.h]) # Required to make the sys/user.h check work correctly on FreeBSD |
54 | diff --git a/open-vm-tools/lib/misc/idLinux.c b/open-vm-tools/lib/misc/idLinux.c | 57 | diff --git a/open-vm-tools/lib/misc/idLinux.c b/open-vm-tools/lib/misc/idLinux.c |
55 | index b950cf84..1dcfb508 100644 | 58 | index 1bb86f48..41c670cf 100644 |
56 | --- a/open-vm-tools/lib/misc/idLinux.c | 59 | --- a/open-vm-tools/lib/misc/idLinux.c |
57 | +++ b/open-vm-tools/lib/misc/idLinux.c | 60 | +++ b/open-vm-tools/lib/misc/idLinux.c |
58 | @@ -27,12 +27,9 @@ | 61 | @@ -27,12 +27,9 @@ |
@@ -69,7 +72,7 @@ index b950cf84..1dcfb508 100644 | |||
69 | #ifdef __APPLE__ | 72 | #ifdef __APPLE__ |
70 | #include <sys/socket.h> | 73 | #include <sys/socket.h> |
71 | #include <TargetConditionals.h> | 74 | #include <TargetConditionals.h> |
72 | @@ -997,31 +994,32 @@ Id_EndSuperUser(uid_t uid) // IN: | 75 | @@ -1025,31 +1022,32 @@ Id_EndSuperUser(uid_t uid) // IN: |
73 | static Bool | 76 | static Bool |
74 | IdIsSetUGid(void) | 77 | IdIsSetUGid(void) |
75 | { | 78 | { |
@@ -115,13 +118,13 @@ index b950cf84..1dcfb508 100644 | |||
115 | } | 118 | } |
116 | #endif | 119 | #endif |
117 | diff --git a/open-vm-tools/lib/nicInfo/nicInfoPosix.c b/open-vm-tools/lib/nicInfo/nicInfoPosix.c | 120 | diff --git a/open-vm-tools/lib/nicInfo/nicInfoPosix.c b/open-vm-tools/lib/nicInfo/nicInfoPosix.c |
118 | index a22981d5..b4e08681 100644 | 121 | index cc5fa281..8710c542 100644 |
119 | --- a/open-vm-tools/lib/nicInfo/nicInfoPosix.c | 122 | --- a/open-vm-tools/lib/nicInfo/nicInfoPosix.c |
120 | +++ b/open-vm-tools/lib/nicInfo/nicInfoPosix.c | 123 | +++ b/open-vm-tools/lib/nicInfo/nicInfoPosix.c |
121 | @@ -34,9 +34,13 @@ | 124 | @@ -35,9 +35,13 @@ |
122 | #include <sys/socket.h> | ||
123 | #include <sys/stat.h> | 125 | #include <sys/stat.h> |
124 | #include <errno.h> | 126 | #include <errno.h> |
127 | #include <limits.h> | ||
125 | -#if defined(__FreeBSD__) || defined(__APPLE__) | 128 | -#if defined(__FreeBSD__) || defined(__APPLE__) |
126 | +#if HAVE_SYS_SYSCTL_H | 129 | +#if HAVE_SYS_SYSCTL_H |
127 | # include <sys/sysctl.h> | 130 | # include <sys/sysctl.h> |
@@ -133,3 +136,6 @@ index a22981d5..b4e08681 100644 | |||
133 | # include <net/if.h> | 136 | # include <net/if.h> |
134 | #endif | 137 | #endif |
135 | #ifndef NO_DNET | 138 | #ifndef NO_DNET |
139 | -- | ||
140 | 2.27.0 | ||
141 | |||
diff --git a/meta-networking/recipes-support/open-vm-tools/open-vm-tools/0009-Rename-poll.h-to-vm_poll.h.patch b/meta-networking/recipes-support/open-vm-tools/open-vm-tools/0009-Rename-poll.h-to-vm_poll.h.patch index 9cf54f6f4..214dac471 100644 --- a/meta-networking/recipes-support/open-vm-tools/open-vm-tools/0009-Rename-poll.h-to-vm_poll.h.patch +++ b/meta-networking/recipes-support/open-vm-tools/open-vm-tools/0009-Rename-poll.h-to-vm_poll.h.patch | |||
@@ -1,27 +1,36 @@ | |||
1 | From 8793466326dd10b0d2dbb83c64beff5cc8c0fc7d Mon Sep 17 00:00:00 2001 | 1 | From 7a5db1cf47e70e72d78a42468912c276e57f865e Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Randy MacLeod <Randy.MacLeod@windriver.com> |
3 | Date: Wed, 13 Jun 2018 23:11:58 -0700 | 3 | Date: Wed, 24 Mar 2021 16:21:35 -0400 |
4 | Subject: [PATCH] Rename poll.h to vm_poll.h | 4 | Subject: [PATCH] Rename poll.h to vm_poll.h |
5 | 5 | ||
6 | Rename poll.h to vm_poll.h and switch from: | ||
7 | #include <sys/poll.h> | ||
8 | to | ||
9 | #include <poll.h> | ||
10 | |||
6 | musl libc's system headers pulls in open-vm-tools' poll.h. To avoid this | 11 | musl libc's system headers pulls in open-vm-tools' poll.h. To avoid this |
7 | we rename poll.h to vm_poll.h. | 12 | we rename poll.h to vm_poll.h. |
8 | 13 | ||
14 | Update for open-vm-tools-11.2.5. | ||
15 | |||
9 | Signed-off-by: Natanael Copa <ncopa@alpinelinux.org> | 16 | Signed-off-by: Natanael Copa <ncopa@alpinelinux.org> |
10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 17 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
18 | Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com> | ||
11 | --- | 19 | --- |
12 | open-vm-tools/lib/asyncsocket/asyncsocket.c | 2 +- | 20 | open-vm-tools/lib/asyncsocket/asyncsocket.c | 2 +- |
13 | open-vm-tools/lib/hgfsServer/hgfsServer.c | 2 +- | 21 | open-vm-tools/lib/hgfsServer/hgfsServer.c | 2 +- |
14 | open-vm-tools/lib/include/asyncsocket.h | 2 +- | 22 | open-vm-tools/lib/include/asyncsocket.h | 2 +- |
15 | open-vm-tools/lib/include/pollImpl.h | 2 +- | 23 | open-vm-tools/lib/include/pollImpl.h | 2 +- |
16 | open-vm-tools/lib/include/{poll.h => vm_poll.h} | 2 +- | 24 | open-vm-tools/lib/include/{poll.h => vm_poll.h} | 2 +- |
17 | open-vm-tools/lib/rpcIn/rpcin.c | 2 +- | 25 | open-vm-tools/lib/rpcIn/rpcin.c | 2 +- |
18 | .../services/plugins/grabbitmqProxy/grabbitmqProxyPlugin.c | 2 +- | 26 | 6 files changed, 6 insertions(+), 6 deletions(-) |
19 | 7 files changed, 7 insertions(+), 7 deletions(-) | ||
20 | rename open-vm-tools/lib/include/{poll.h => vm_poll.h} (99%) | 27 | rename open-vm-tools/lib/include/{poll.h => vm_poll.h} (99%) |
21 | 28 | ||
29 | diff --git a/open-vm-tools/lib/asyncsocket/asyncsocket.c b/open-vm-tools/lib/asyncsocket/asyncsocket.c | ||
30 | index 9914ffc5..89679f7a 100644 | ||
22 | --- a/open-vm-tools/lib/asyncsocket/asyncsocket.c | 31 | --- a/open-vm-tools/lib/asyncsocket/asyncsocket.c |
23 | +++ b/open-vm-tools/lib/asyncsocket/asyncsocket.c | 32 | +++ b/open-vm-tools/lib/asyncsocket/asyncsocket.c |
24 | @@ -86,7 +86,7 @@ | 33 | @@ -87,7 +87,7 @@ |
25 | #include "random.h" | 34 | #include "random.h" |
26 | #include "asyncsocket.h" | 35 | #include "asyncsocket.h" |
27 | #include "asyncSocketBase.h" | 36 | #include "asyncSocketBase.h" |
@@ -30,20 +39,24 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
30 | #include "log.h" | 39 | #include "log.h" |
31 | #include "err.h" | 40 | #include "err.h" |
32 | #include "hostinfo.h" | 41 | #include "hostinfo.h" |
42 | diff --git a/open-vm-tools/lib/hgfsServer/hgfsServer.c b/open-vm-tools/lib/hgfsServer/hgfsServer.c | ||
43 | index 3a18a7e1..acdda54d 100644 | ||
33 | --- a/open-vm-tools/lib/hgfsServer/hgfsServer.c | 44 | --- a/open-vm-tools/lib/hgfsServer/hgfsServer.c |
34 | +++ b/open-vm-tools/lib/hgfsServer/hgfsServer.c | 45 | +++ b/open-vm-tools/lib/hgfsServer/hgfsServer.c |
35 | @@ -48,7 +48,7 @@ | 46 | @@ -51,7 +51,7 @@ |
36 | #include "hgfsServerOplock.h" | ||
37 | #include "hgfsDirNotify.h" | 47 | #include "hgfsDirNotify.h" |
48 | #include "hgfsThreadpool.h" | ||
38 | #include "userlock.h" | 49 | #include "userlock.h" |
39 | -#include "poll.h" | 50 | -#include "poll.h" |
40 | +#include "vm_poll.h" | 51 | +#include "vm_poll.h" |
41 | #include "mutexRankLib.h" | 52 | #include "mutexRankLib.h" |
42 | #include "vm_basic_asm.h" | 53 | #include "vm_basic_asm.h" |
43 | #include "unicodeOperations.h" | 54 | #include "unicodeOperations.h" |
55 | diff --git a/open-vm-tools/lib/include/asyncsocket.h b/open-vm-tools/lib/include/asyncsocket.h | ||
56 | index 746dd78b..82c22f46 100644 | ||
44 | --- a/open-vm-tools/lib/include/asyncsocket.h | 57 | --- a/open-vm-tools/lib/include/asyncsocket.h |
45 | +++ b/open-vm-tools/lib/include/asyncsocket.h | 58 | +++ b/open-vm-tools/lib/include/asyncsocket.h |
46 | @@ -164,7 +164,7 @@ typedef struct AsyncSocket AsyncSocket; | 59 | @@ -171,7 +171,7 @@ typedef struct AsyncSocket AsyncSocket; |
47 | * Or the client can specify its favorite poll class and locking behavior. | 60 | * Or the client can specify its favorite poll class and locking behavior. |
48 | * Use of IVmdbPoll is only supported for regular sockets and for Attach. | 61 | * Use of IVmdbPoll is only supported for regular sockets and for Attach. |
49 | */ | 62 | */ |
@@ -52,6 +65,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
52 | struct IVmdbPoll; | 65 | struct IVmdbPoll; |
53 | typedef struct AsyncSocketPollParams { | 66 | typedef struct AsyncSocketPollParams { |
54 | int flags; /* Default 0, only POLL_FLAG_NO_BULL is valid */ | 67 | int flags; /* Default 0, only POLL_FLAG_NO_BULL is valid */ |
68 | diff --git a/open-vm-tools/lib/include/pollImpl.h b/open-vm-tools/lib/include/pollImpl.h | ||
69 | index 46442e55..8bc66997 100644 | ||
55 | --- a/open-vm-tools/lib/include/pollImpl.h | 70 | --- a/open-vm-tools/lib/include/pollImpl.h |
56 | +++ b/open-vm-tools/lib/include/pollImpl.h | 71 | +++ b/open-vm-tools/lib/include/pollImpl.h |
57 | @@ -44,7 +44,7 @@ | 72 | @@ -44,7 +44,7 @@ |
@@ -63,672 +78,24 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
63 | #include "vm_basic_asm.h" | 78 | #include "vm_basic_asm.h" |
64 | 79 | ||
65 | #if defined(__cplusplus) | 80 | #if defined(__cplusplus) |
81 | diff --git a/open-vm-tools/lib/include/poll.h b/open-vm-tools/lib/include/vm_poll.h | ||
82 | similarity index 99% | ||
83 | rename from open-vm-tools/lib/include/poll.h | ||
84 | rename to open-vm-tools/lib/include/vm_poll.h | ||
85 | index c90f5dcd..73a56204 100644 | ||
66 | --- a/open-vm-tools/lib/include/poll.h | 86 | --- a/open-vm-tools/lib/include/poll.h |
67 | +++ /dev/null | ||
68 | @@ -1,330 +0,0 @@ | ||
69 | -/********************************************************* | ||
70 | - * Copyright (C) 1998-2018 VMware, Inc. All rights reserved. | ||
71 | - * | ||
72 | - * This program is free software; you can redistribute it and/or modify it | ||
73 | - * under the terms of the GNU Lesser General Public License as published | ||
74 | - * by the Free Software Foundation version 2.1 and no later version. | ||
75 | - * | ||
76 | - * This program is distributed in the hope that it will be useful, but | ||
77 | - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | ||
78 | - * or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU General Public | ||
79 | - * License for more details. | ||
80 | - * | ||
81 | - * You should have received a copy of the GNU Lesser General Public License | ||
82 | - * along with this program; if not, write to the Free Software Foundation, Inc., | ||
83 | - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | ||
84 | - * | ||
85 | - *********************************************************/ | ||
86 | - | ||
87 | -/********************************************************* | ||
88 | - * The contents of this file are subject to the terms of the Common | ||
89 | - * Development and Distribution License (the "License") version 1.0 | ||
90 | - * and no later version. You may not use this file except in | ||
91 | - * compliance with the License. | ||
92 | - * | ||
93 | - * You can obtain a copy of the License at | ||
94 | - * http://www.opensource.org/licenses/cddl1.php | ||
95 | - * | ||
96 | - * See the License for the specific language governing permissions | ||
97 | - * and limitations under the License. | ||
98 | - * | ||
99 | - *********************************************************/ | ||
100 | - | ||
101 | - | ||
102 | -#ifndef _POLL_H_ | ||
103 | -#define _POLL_H_ | ||
104 | - | ||
105 | -#define INCLUDE_ALLOW_USERLEVEL | ||
106 | -#define INCLUDE_ALLOW_VMCORE | ||
107 | -#include "includeCheck.h" | ||
108 | - | ||
109 | -#include "vm_basic_types.h" | ||
110 | -#include "vm_basic_defs.h" | ||
111 | -#include "vmware.h" | ||
112 | -#include "userlock.h" | ||
113 | - | ||
114 | -#if defined(__cplusplus) | ||
115 | -extern "C" { | ||
116 | -#endif | ||
117 | - | ||
118 | -#ifdef _WIN32 | ||
119 | -#define HZ 100 | ||
120 | -#elif defined linux | ||
121 | -#include <asm/param.h> | ||
122 | -#elif __APPLE__ | ||
123 | -#include <TargetConditionals.h> | ||
124 | -/* | ||
125 | - * Old SDKs don't define TARGET_OS_IPHONE at all. | ||
126 | - * New ones define it to 0 on Mac OS X, 1 on iOS. | ||
127 | - */ | ||
128 | -#if !defined(TARGET_OS_IPHONE) || TARGET_OS_IPHONE == 0 | ||
129 | -#include <sys/kernel.h> | ||
130 | -#endif | ||
131 | -#include <sys/poll.h> | ||
132 | -#define HZ 100 | ||
133 | -#endif | ||
134 | -#ifdef __ANDROID__ | ||
135 | -/* | ||
136 | - * <poll.h> of android should be included, but its name is same | ||
137 | - * with this file. So its content is put here to avoid conflict. | ||
138 | - */ | ||
139 | -#include <asm/poll.h> | ||
140 | -#define HZ 100 | ||
141 | -typedef unsigned int nfds_t; | ||
142 | -int poll(struct pollfd *, nfds_t, long); | ||
143 | -#endif | ||
144 | - | ||
145 | - | ||
146 | -/* | ||
147 | - * Poll event types: each type has a different reason for firing, | ||
148 | - * or condition that must be met before firing. | ||
149 | - */ | ||
150 | - | ||
151 | -typedef enum { | ||
152 | - /* | ||
153 | - * Actual Poll queue types against which you can register callbacks. | ||
154 | - */ | ||
155 | - POLL_VIRTUALREALTIME = -1, /* Negative because it doesn't have its own Q */ | ||
156 | - POLL_VTIME = 0, | ||
157 | - POLL_REALTIME, | ||
158 | - POLL_DEVICE, | ||
159 | - POLL_MAIN_LOOP, | ||
160 | - POLL_NUM_QUEUES | ||
161 | -} PollEventType; | ||
162 | - | ||
163 | - | ||
164 | -/* | ||
165 | - * Classes of events | ||
166 | - * | ||
167 | - * These are the predefined classes. More can be declared | ||
168 | - * with Poll_AllocClass(). | ||
169 | - */ | ||
170 | - | ||
171 | -typedef enum PollClass { | ||
172 | - POLL_CLASS_MAIN, | ||
173 | - POLL_CLASS_PAUSE, | ||
174 | - POLL_CLASS_IPC, | ||
175 | - POLL_CLASS_CPT, | ||
176 | - POLL_CLASS_MKS, | ||
177 | - POLL_FIXED_CLASSES, | ||
178 | - POLL_DEFAULT_FIXED_CLASSES, | ||
179 | - /* Size enum to maximum */ | ||
180 | - POLL_MAX_CLASSES = 31, | ||
181 | -} PollClass; | ||
182 | - | ||
183 | -/* | ||
184 | - * Do not use; Special pseudo private poll class supported by | ||
185 | - * PollDefault only | ||
186 | - */ | ||
187 | -#define POLL_DEFAULT_CLASS_NET POLL_FIXED_CLASSES | ||
188 | -#define POLL_DEFAULT_CS_NET PollClassSet_Singleton(POLL_DEFAULT_CLASS_NET) | ||
189 | - | ||
190 | -/* | ||
191 | - * Each callback is registered in a set of classes | ||
192 | - */ | ||
193 | - | ||
194 | -typedef struct PollClassSet { | ||
195 | - uintptr_t bits; | ||
196 | -} PollClassSet; | ||
197 | - | ||
198 | -/* An empty PollClassSet. */ | ||
199 | -static INLINE PollClassSet | ||
200 | -PollClassSet_Empty(void) | ||
201 | -{ | ||
202 | - PollClassSet set = { 0 }; | ||
203 | - return set; | ||
204 | -} | ||
205 | - | ||
206 | -/* A PollClassSet with the single member. */ | ||
207 | -static INLINE PollClassSet | ||
208 | -PollClassSet_Singleton(PollClass c) | ||
209 | -{ | ||
210 | - PollClassSet s = PollClassSet_Empty(); | ||
211 | - | ||
212 | - ASSERT_ON_COMPILE(POLL_MAX_CLASSES < sizeof s.bits * 8); | ||
213 | - ASSERT(c < POLL_MAX_CLASSES); | ||
214 | - | ||
215 | - s.bits = CONST3264U(1) << c; | ||
216 | - return s; | ||
217 | -} | ||
218 | - | ||
219 | -/* Combine two PollClassSets. */ | ||
220 | -static INLINE PollClassSet | ||
221 | -PollClassSet_Union(PollClassSet lhs, PollClassSet rhs) | ||
222 | -{ | ||
223 | - PollClassSet set; | ||
224 | - set.bits = lhs.bits | rhs.bits; | ||
225 | - return set; | ||
226 | -} | ||
227 | - | ||
228 | -/* Add single class to PollClassSet. */ | ||
229 | -static INLINE PollClassSet | ||
230 | -PollClassSet_Include(PollClassSet set, PollClass c) | ||
231 | -{ | ||
232 | - return PollClassSet_Union(set, PollClassSet_Singleton(c)); | ||
233 | -} | ||
234 | - | ||
235 | - | ||
236 | -#define POLL_CS_MAIN PollClassSet_Singleton(POLL_CLASS_MAIN) | ||
237 | -#define POLL_CS_PAUSE PollClassSet_Union(POLL_CS_MAIN, \ | ||
238 | - PollClassSet_Singleton(POLL_CLASS_PAUSE)) | ||
239 | -#define POLL_CS_CPT PollClassSet_Union(POLL_CS_PAUSE, \ | ||
240 | - PollClassSet_Singleton(POLL_CLASS_CPT)) | ||
241 | -#define POLL_CS_IPC PollClassSet_Union(POLL_CS_CPT, \ | ||
242 | - PollClassSet_Singleton(POLL_CLASS_IPC)) | ||
243 | -#define POLL_CS_VMDB POLL_CS_PAUSE /* POLL_CLASS_VMDB is retired */ | ||
244 | -#define POLL_CS_MKS PollClassSet_Singleton(POLL_CLASS_MKS) | ||
245 | -/* | ||
246 | - * DANGER. You don't need POLL_CS_ALWAYS. Really. So don't use it. | ||
247 | - */ | ||
248 | -#define POLL_CS_ALWAYS PollClassSet_Union(POLL_CS_CPT, POLL_CS_IPC) | ||
249 | - | ||
250 | -/* | ||
251 | - * Poll class-set taxonomy: | ||
252 | - * POLL_CS_MAIN | ||
253 | - * - Unless you NEED another class, use POLL_CS_MAIN. | ||
254 | - * POLL_CS_PAUSE | ||
255 | - * - For callbacks that must occur even if the guest is paused. | ||
256 | - * Most VMDB or Foundry commands are in this category. | ||
257 | - * POLL_CS_CPT | ||
258 | - * - Only for callbacks which can trigger intermediate Checkpoint | ||
259 | - * transitions. | ||
260 | - * The ONLY such callback is Migrate. | ||
261 | - * POLL_CS_IPC | ||
262 | - * - Only for callbacks which can contain Msg_(Post|Hint|Question) | ||
263 | - * responses, and for signal handlers (why)? | ||
264 | - * Vigor, VMDB, and Foundry can contain Msg_* responses. | ||
265 | - * POLL_CS_MKS | ||
266 | - * - Callback runs in MKS thread. | ||
267 | - * POLL_CS_ALWAYS | ||
268 | - * - Only for events that must be processed immediately. | ||
269 | - * The ONLY such callback is OvhdMemVmxSizeCheck. | ||
270 | - */ | ||
271 | - | ||
272 | - | ||
273 | -/* | ||
274 | - * Poll_Callback flags | ||
275 | - */ | ||
276 | - | ||
277 | -#define POLL_FLAG_PERIODIC 0x01 // keep after firing | ||
278 | -#define POLL_FLAG_REMOVE_AT_POWEROFF 0x02 // self-explanatory | ||
279 | -#define POLL_FLAG_READ 0x04 // device is ready for reading | ||
280 | -#define POLL_FLAG_WRITE 0x08 // device is ready for writing | ||
281 | -#define POLL_FLAG_SOCKET 0x10 // device is a Windows socket | ||
282 | -#define POLL_FLAG_NO_BULL 0x20 // callback does its own locking | ||
283 | -#define POLL_FLAG_WINSOCK 0x40 // Winsock style write events | ||
284 | -#define POLL_FLAG_FD 0x80 // device is a Windows file descriptor. | ||
285 | -#define POLL_FLAG_ACCEPT_INVALID_FDS 0x100 // For broken 3rd party libs, e.g. curl | ||
286 | -#define POLL_FLAG_THUNK_TO_WND 0x200 // thunk callback to window message loop | ||
287 | - | ||
288 | - | ||
289 | -typedef void (*PollerFunction)(void *clientData); | ||
290 | -typedef void (*PollerFireWrapper)(PollerFunction func, | ||
291 | - void *funcData, | ||
292 | - void *wrapperData); | ||
293 | -typedef Bool (*PollerErrorFn)(const char *errorStr); | ||
294 | - | ||
295 | -/* | ||
296 | - * Initialisers: | ||
297 | - * | ||
298 | - * For the sake of convenience, we declare the initialisers | ||
299 | - * for custom implmentations here, even though the actual | ||
300 | - * implementations are distinct from the core poll code. | ||
301 | - */ | ||
302 | - | ||
303 | -typedef struct PollOptions { | ||
304 | - Bool locked; // Use internal MXUser for locking | ||
305 | - Bool allowFullQueue; // Don't assert when device event queue is full. | ||
306 | - VThreadID windowsMsgThread; // thread that processes Windows messages | ||
307 | - PollerFireWrapper fireWrapperFn; // optional; may be useful for stats | ||
308 | - void *fireWrapperData; // optional | ||
309 | - PollerErrorFn errorFn; // optional; called upon unrecoverable error | ||
310 | -} PollOptions; | ||
311 | - | ||
312 | - | ||
313 | -void Poll_InitDefault(void); | ||
314 | -void Poll_InitDefaultEx(const PollOptions *opts); | ||
315 | -void Poll_InitGtk(void); // On top of glib for Linux | ||
316 | -void Poll_InitCF(void); // On top of CoreFoundation for OSX | ||
317 | - | ||
318 | - | ||
319 | -/* | ||
320 | - * Functions | ||
321 | - */ | ||
322 | -int Poll_SocketPair(Bool vmci, Bool stream, int fds[2]); | ||
323 | -void Poll_Loop(Bool loop, Bool *exit, PollClass c); | ||
324 | -void Poll_LoopTimeout(Bool loop, Bool *exit, PollClass c, int timeout); | ||
325 | -Bool Poll_LockingEnabled(void); | ||
326 | -void Poll_Exit(void); | ||
327 | - | ||
328 | - | ||
329 | -/* | ||
330 | - * Poll_Callback adds a callback regardless of whether an identical one exists. | ||
331 | - * The exception to this rule is POLL_DEVICE callbacks: there is a maximum of | ||
332 | - * one read and one write callback per fd. | ||
333 | - * | ||
334 | - * Poll_CallbackRemove removes one callback. If there are multiple identical | ||
335 | - * callbacks, which one is removed is an implementation detail. Note that in | ||
336 | - * the case of POLL_DEVICE and POLL_REALTIME callbacks, the fd/delay used to | ||
337 | - * create the callback is not specified when removing, so all callbacks | ||
338 | - * of those types with the same flags, function, and clientData are considered | ||
339 | - * "identical" even if their fd/delay differed. | ||
340 | - */ | ||
341 | - | ||
342 | -VMwareStatus Poll_Callback(PollClassSet classSet, | ||
343 | - int flags, | ||
344 | - PollerFunction f, | ||
345 | - void *clientData, | ||
346 | - PollEventType type, | ||
347 | - PollDevHandle info, // fd/microsec delay | ||
348 | - MXUserRecLock *lck); | ||
349 | -Bool Poll_CallbackRemove(PollClassSet classSet, | ||
350 | - int flags, | ||
351 | - PollerFunction f, | ||
352 | - void *clientData, | ||
353 | - PollEventType type); | ||
354 | -Bool Poll_CallbackRemoveOneByCB(PollClassSet classSet, | ||
355 | - int flags, | ||
356 | - PollerFunction f, | ||
357 | - PollEventType type, | ||
358 | - void **clientData); | ||
359 | - | ||
360 | -void Poll_NotifyChange(PollClassSet classSet); | ||
361 | - | ||
362 | -/* | ||
363 | - * Wrappers for Poll_Callback and Poll_CallbackRemove that present | ||
364 | - * simpler subsets of those interfaces. | ||
365 | - */ | ||
366 | - | ||
367 | -VMwareStatus Poll_CB_Device(PollerFunction f, | ||
368 | - void *clientData, | ||
369 | - PollDevHandle device, | ||
370 | - Bool periodic); | ||
371 | - | ||
372 | -Bool Poll_CB_DeviceRemove(PollerFunction f, | ||
373 | - void *clientData, | ||
374 | - Bool periodic); | ||
375 | - | ||
376 | - | ||
377 | -VMwareStatus Poll_CB_RTime(PollerFunction f, | ||
378 | - void *clientData, | ||
379 | - int64 delay, // microseconds | ||
380 | - Bool periodic, | ||
381 | - MXUserRecLock *lock); | ||
382 | - | ||
383 | -Bool Poll_CB_RTimeRemove(PollerFunction f, | ||
384 | - void *clientData, | ||
385 | - Bool periodic); | ||
386 | - | ||
387 | - | ||
388 | -#ifdef _WIN32 | ||
389 | -void Poll_SetPumpsWindowsMessages(Bool pumps); | ||
390 | -void Poll_SetWindowMessageRecipient(HWND hWnd, UINT msg, Bool alwaysThunk); | ||
391 | -Bool Poll_FireWndCallback(void *lparam); | ||
392 | -#endif | ||
393 | - | ||
394 | -#if defined(__cplusplus) | ||
395 | -} // extern "C" | ||
396 | -#endif | ||
397 | - | ||
398 | -#endif // _POLL_H_ | ||
399 | --- /dev/null | ||
400 | +++ b/open-vm-tools/lib/include/vm_poll.h | 87 | +++ b/open-vm-tools/lib/include/vm_poll.h |
401 | @@ -0,0 +1,330 @@ | 88 | @@ -60,7 +60,7 @@ extern "C" { |
402 | +/********************************************************* | 89 | #if !defined(TARGET_OS_IPHONE) || TARGET_OS_IPHONE == 0 |
403 | + * Copyright (C) 1998-2018 VMware, Inc. All rights reserved. | 90 | #include <sys/kernel.h> |
404 | + * | 91 | #endif |
405 | + * This program is free software; you can redistribute it and/or modify it | 92 | -#include <sys/poll.h> |
406 | + * under the terms of the GNU Lesser General Public License as published | ||
407 | + * by the Free Software Foundation version 2.1 and no later version. | ||
408 | + * | ||
409 | + * This program is distributed in the hope that it will be useful, but | ||
410 | + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | ||
411 | + * or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU General Public | ||
412 | + * License for more details. | ||
413 | + * | ||
414 | + * You should have received a copy of the GNU Lesser General Public License | ||
415 | + * along with this program; if not, write to the Free Software Foundation, Inc., | ||
416 | + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | ||
417 | + * | ||
418 | + *********************************************************/ | ||
419 | + | ||
420 | +/********************************************************* | ||
421 | + * The contents of this file are subject to the terms of the Common | ||
422 | + * Development and Distribution License (the "License") version 1.0 | ||
423 | + * and no later version. You may not use this file except in | ||
424 | + * compliance with the License. | ||
425 | + * | ||
426 | + * You can obtain a copy of the License at | ||
427 | + * http://www.opensource.org/licenses/cddl1.php | ||
428 | + * | ||
429 | + * See the License for the specific language governing permissions | ||
430 | + * and limitations under the License. | ||
431 | + * | ||
432 | + *********************************************************/ | ||
433 | + | ||
434 | + | ||
435 | +#ifndef _POLL_H_ | ||
436 | +#define _POLL_H_ | ||
437 | + | ||
438 | +#define INCLUDE_ALLOW_USERLEVEL | ||
439 | +#define INCLUDE_ALLOW_VMCORE | ||
440 | +#include "includeCheck.h" | ||
441 | + | ||
442 | +#include "vm_basic_types.h" | ||
443 | +#include "vm_basic_defs.h" | ||
444 | +#include "vmware.h" | ||
445 | +#include "userlock.h" | ||
446 | + | ||
447 | +#if defined(__cplusplus) | ||
448 | +extern "C" { | ||
449 | +#endif | ||
450 | + | ||
451 | +#ifdef _WIN32 | ||
452 | +#define HZ 100 | ||
453 | +#elif defined linux | ||
454 | +#include <asm/param.h> | ||
455 | +#elif __APPLE__ | ||
456 | +#include <TargetConditionals.h> | ||
457 | +/* | ||
458 | + * Old SDKs don't define TARGET_OS_IPHONE at all. | ||
459 | + * New ones define it to 0 on Mac OS X, 1 on iOS. | ||
460 | + */ | ||
461 | +#if !defined(TARGET_OS_IPHONE) || TARGET_OS_IPHONE == 0 | ||
462 | +#include <sys/kernel.h> | ||
463 | +#endif | ||
464 | +#include <poll.h> | 93 | +#include <poll.h> |
465 | +#define HZ 100 | 94 | #define HZ 100 |
466 | +#endif | 95 | #endif |
467 | +#ifdef __ANDROID__ | 96 | #ifdef __ANDROID__ |
468 | +/* | 97 | diff --git a/open-vm-tools/lib/rpcIn/rpcin.c b/open-vm-tools/lib/rpcIn/rpcin.c |
469 | + * <poll.h> of android should be included, but its name is same | 98 | index 8b1fe759..f22fcd40 100644 |
470 | + * with this file. So its content is put here to avoid conflict. | ||
471 | + */ | ||
472 | +#include <asm/poll.h> | ||
473 | +#define HZ 100 | ||
474 | +typedef unsigned int nfds_t; | ||
475 | +int poll(struct pollfd *, nfds_t, long); | ||
476 | +#endif | ||
477 | + | ||
478 | + | ||
479 | +/* | ||
480 | + * Poll event types: each type has a different reason for firing, | ||
481 | + * or condition that must be met before firing. | ||
482 | + */ | ||
483 | + | ||
484 | +typedef enum { | ||
485 | + /* | ||
486 | + * Actual Poll queue types against which you can register callbacks. | ||
487 | + */ | ||
488 | + POLL_VIRTUALREALTIME = -1, /* Negative because it doesn't have its own Q */ | ||
489 | + POLL_VTIME = 0, | ||
490 | + POLL_REALTIME, | ||
491 | + POLL_DEVICE, | ||
492 | + POLL_MAIN_LOOP, | ||
493 | + POLL_NUM_QUEUES | ||
494 | +} PollEventType; | ||
495 | + | ||
496 | + | ||
497 | +/* | ||
498 | + * Classes of events | ||
499 | + * | ||
500 | + * These are the predefined classes. More can be declared | ||
501 | + * with Poll_AllocClass(). | ||
502 | + */ | ||
503 | + | ||
504 | +typedef enum PollClass { | ||
505 | + POLL_CLASS_MAIN, | ||
506 | + POLL_CLASS_PAUSE, | ||
507 | + POLL_CLASS_IPC, | ||
508 | + POLL_CLASS_CPT, | ||
509 | + POLL_CLASS_MKS, | ||
510 | + POLL_FIXED_CLASSES, | ||
511 | + POLL_DEFAULT_FIXED_CLASSES, | ||
512 | + /* Size enum to maximum */ | ||
513 | + POLL_MAX_CLASSES = 31, | ||
514 | +} PollClass; | ||
515 | + | ||
516 | +/* | ||
517 | + * Do not use; Special pseudo private poll class supported by | ||
518 | + * PollDefault only | ||
519 | + */ | ||
520 | +#define POLL_DEFAULT_CLASS_NET POLL_FIXED_CLASSES | ||
521 | +#define POLL_DEFAULT_CS_NET PollClassSet_Singleton(POLL_DEFAULT_CLASS_NET) | ||
522 | + | ||
523 | +/* | ||
524 | + * Each callback is registered in a set of classes | ||
525 | + */ | ||
526 | + | ||
527 | +typedef struct PollClassSet { | ||
528 | + uintptr_t bits; | ||
529 | +} PollClassSet; | ||
530 | + | ||
531 | +/* An empty PollClassSet. */ | ||
532 | +static INLINE PollClassSet | ||
533 | +PollClassSet_Empty(void) | ||
534 | +{ | ||
535 | + PollClassSet set = { 0 }; | ||
536 | + return set; | ||
537 | +} | ||
538 | + | ||
539 | +/* A PollClassSet with the single member. */ | ||
540 | +static INLINE PollClassSet | ||
541 | +PollClassSet_Singleton(PollClass c) | ||
542 | +{ | ||
543 | + PollClassSet s = PollClassSet_Empty(); | ||
544 | + | ||
545 | + ASSERT_ON_COMPILE(POLL_MAX_CLASSES < sizeof s.bits * 8); | ||
546 | + ASSERT(c < POLL_MAX_CLASSES); | ||
547 | + | ||
548 | + s.bits = CONST3264U(1) << c; | ||
549 | + return s; | ||
550 | +} | ||
551 | + | ||
552 | +/* Combine two PollClassSets. */ | ||
553 | +static INLINE PollClassSet | ||
554 | +PollClassSet_Union(PollClassSet lhs, PollClassSet rhs) | ||
555 | +{ | ||
556 | + PollClassSet set; | ||
557 | + set.bits = lhs.bits | rhs.bits; | ||
558 | + return set; | ||
559 | +} | ||
560 | + | ||
561 | +/* Add single class to PollClassSet. */ | ||
562 | +static INLINE PollClassSet | ||
563 | +PollClassSet_Include(PollClassSet set, PollClass c) | ||
564 | +{ | ||
565 | + return PollClassSet_Union(set, PollClassSet_Singleton(c)); | ||
566 | +} | ||
567 | + | ||
568 | + | ||
569 | +#define POLL_CS_MAIN PollClassSet_Singleton(POLL_CLASS_MAIN) | ||
570 | +#define POLL_CS_PAUSE PollClassSet_Union(POLL_CS_MAIN, \ | ||
571 | + PollClassSet_Singleton(POLL_CLASS_PAUSE)) | ||
572 | +#define POLL_CS_CPT PollClassSet_Union(POLL_CS_PAUSE, \ | ||
573 | + PollClassSet_Singleton(POLL_CLASS_CPT)) | ||
574 | +#define POLL_CS_IPC PollClassSet_Union(POLL_CS_CPT, \ | ||
575 | + PollClassSet_Singleton(POLL_CLASS_IPC)) | ||
576 | +#define POLL_CS_VMDB POLL_CS_PAUSE /* POLL_CLASS_VMDB is retired */ | ||
577 | +#define POLL_CS_MKS PollClassSet_Singleton(POLL_CLASS_MKS) | ||
578 | +/* | ||
579 | + * DANGER. You don't need POLL_CS_ALWAYS. Really. So don't use it. | ||
580 | + */ | ||
581 | +#define POLL_CS_ALWAYS PollClassSet_Union(POLL_CS_CPT, POLL_CS_IPC) | ||
582 | + | ||
583 | +/* | ||
584 | + * Poll class-set taxonomy: | ||
585 | + * POLL_CS_MAIN | ||
586 | + * - Unless you NEED another class, use POLL_CS_MAIN. | ||
587 | + * POLL_CS_PAUSE | ||
588 | + * - For callbacks that must occur even if the guest is paused. | ||
589 | + * Most VMDB or Foundry commands are in this category. | ||
590 | + * POLL_CS_CPT | ||
591 | + * - Only for callbacks which can trigger intermediate Checkpoint | ||
592 | + * transitions. | ||
593 | + * The ONLY such callback is Migrate. | ||
594 | + * POLL_CS_IPC | ||
595 | + * - Only for callbacks which can contain Msg_(Post|Hint|Question) | ||
596 | + * responses, and for signal handlers (why)? | ||
597 | + * Vigor, VMDB, and Foundry can contain Msg_* responses. | ||
598 | + * POLL_CS_MKS | ||
599 | + * - Callback runs in MKS thread. | ||
600 | + * POLL_CS_ALWAYS | ||
601 | + * - Only for events that must be processed immediately. | ||
602 | + * The ONLY such callback is OvhdMemVmxSizeCheck. | ||
603 | + */ | ||
604 | + | ||
605 | + | ||
606 | +/* | ||
607 | + * Poll_Callback flags | ||
608 | + */ | ||
609 | + | ||
610 | +#define POLL_FLAG_PERIODIC 0x01 // keep after firing | ||
611 | +#define POLL_FLAG_REMOVE_AT_POWEROFF 0x02 // self-explanatory | ||
612 | +#define POLL_FLAG_READ 0x04 // device is ready for reading | ||
613 | +#define POLL_FLAG_WRITE 0x08 // device is ready for writing | ||
614 | +#define POLL_FLAG_SOCKET 0x10 // device is a Windows socket | ||
615 | +#define POLL_FLAG_NO_BULL 0x20 // callback does its own locking | ||
616 | +#define POLL_FLAG_WINSOCK 0x40 // Winsock style write events | ||
617 | +#define POLL_FLAG_FD 0x80 // device is a Windows file descriptor. | ||
618 | +#define POLL_FLAG_ACCEPT_INVALID_FDS 0x100 // For broken 3rd party libs, e.g. curl | ||
619 | +#define POLL_FLAG_THUNK_TO_WND 0x200 // thunk callback to window message loop | ||
620 | + | ||
621 | + | ||
622 | +typedef void (*PollerFunction)(void *clientData); | ||
623 | +typedef void (*PollerFireWrapper)(PollerFunction func, | ||
624 | + void *funcData, | ||
625 | + void *wrapperData); | ||
626 | +typedef Bool (*PollerErrorFn)(const char *errorStr); | ||
627 | + | ||
628 | +/* | ||
629 | + * Initialisers: | ||
630 | + * | ||
631 | + * For the sake of convenience, we declare the initialisers | ||
632 | + * for custom implmentations here, even though the actual | ||
633 | + * implementations are distinct from the core poll code. | ||
634 | + */ | ||
635 | + | ||
636 | +typedef struct PollOptions { | ||
637 | + Bool locked; // Use internal MXUser for locking | ||
638 | + Bool allowFullQueue; // Don't assert when device event queue is full. | ||
639 | + VThreadID windowsMsgThread; // thread that processes Windows messages | ||
640 | + PollerFireWrapper fireWrapperFn; // optional; may be useful for stats | ||
641 | + void *fireWrapperData; // optional | ||
642 | + PollerErrorFn errorFn; // optional; called upon unrecoverable error | ||
643 | +} PollOptions; | ||
644 | + | ||
645 | + | ||
646 | +void Poll_InitDefault(void); | ||
647 | +void Poll_InitDefaultEx(const PollOptions *opts); | ||
648 | +void Poll_InitGtk(void); // On top of glib for Linux | ||
649 | +void Poll_InitCF(void); // On top of CoreFoundation for OSX | ||
650 | + | ||
651 | + | ||
652 | +/* | ||
653 | + * Functions | ||
654 | + */ | ||
655 | +int Poll_SocketPair(Bool vmci, Bool stream, int fds[2]); | ||
656 | +void Poll_Loop(Bool loop, Bool *exit, PollClass c); | ||
657 | +void Poll_LoopTimeout(Bool loop, Bool *exit, PollClass c, int timeout); | ||
658 | +Bool Poll_LockingEnabled(void); | ||
659 | +void Poll_Exit(void); | ||
660 | + | ||
661 | + | ||
662 | +/* | ||
663 | + * Poll_Callback adds a callback regardless of whether an identical one exists. | ||
664 | + * The exception to this rule is POLL_DEVICE callbacks: there is a maximum of | ||
665 | + * one read and one write callback per fd. | ||
666 | + * | ||
667 | + * Poll_CallbackRemove removes one callback. If there are multiple identical | ||
668 | + * callbacks, which one is removed is an implementation detail. Note that in | ||
669 | + * the case of POLL_DEVICE and POLL_REALTIME callbacks, the fd/delay used to | ||
670 | + * create the callback is not specified when removing, so all callbacks | ||
671 | + * of those types with the same flags, function, and clientData are considered | ||
672 | + * "identical" even if their fd/delay differed. | ||
673 | + */ | ||
674 | + | ||
675 | +VMwareStatus Poll_Callback(PollClassSet classSet, | ||
676 | + int flags, | ||
677 | + PollerFunction f, | ||
678 | + void *clientData, | ||
679 | + PollEventType type, | ||
680 | + PollDevHandle info, // fd/microsec delay | ||
681 | + MXUserRecLock *lck); | ||
682 | +Bool Poll_CallbackRemove(PollClassSet classSet, | ||
683 | + int flags, | ||
684 | + PollerFunction f, | ||
685 | + void *clientData, | ||
686 | + PollEventType type); | ||
687 | +Bool Poll_CallbackRemoveOneByCB(PollClassSet classSet, | ||
688 | + int flags, | ||
689 | + PollerFunction f, | ||
690 | + PollEventType type, | ||
691 | + void **clientData); | ||
692 | + | ||
693 | +void Poll_NotifyChange(PollClassSet classSet); | ||
694 | + | ||
695 | +/* | ||
696 | + * Wrappers for Poll_Callback and Poll_CallbackRemove that present | ||
697 | + * simpler subsets of those interfaces. | ||
698 | + */ | ||
699 | + | ||
700 | +VMwareStatus Poll_CB_Device(PollerFunction f, | ||
701 | + void *clientData, | ||
702 | + PollDevHandle device, | ||
703 | + Bool periodic); | ||
704 | + | ||
705 | +Bool Poll_CB_DeviceRemove(PollerFunction f, | ||
706 | + void *clientData, | ||
707 | + Bool periodic); | ||
708 | + | ||
709 | + | ||
710 | +VMwareStatus Poll_CB_RTime(PollerFunction f, | ||
711 | + void *clientData, | ||
712 | + int64 delay, // microseconds | ||
713 | + Bool periodic, | ||
714 | + MXUserRecLock *lock); | ||
715 | + | ||
716 | +Bool Poll_CB_RTimeRemove(PollerFunction f, | ||
717 | + void *clientData, | ||
718 | + Bool periodic); | ||
719 | + | ||
720 | + | ||
721 | +#ifdef _WIN32 | ||
722 | +void Poll_SetPumpsWindowsMessages(Bool pumps); | ||
723 | +void Poll_SetWindowMessageRecipient(HWND hWnd, UINT msg, Bool alwaysThunk); | ||
724 | +Bool Poll_FireWndCallback(void *lparam); | ||
725 | +#endif | ||
726 | + | ||
727 | +#if defined(__cplusplus) | ||
728 | +} // extern "C" | ||
729 | +#endif | ||
730 | + | ||
731 | +#endif // _POLL_H_ | ||
732 | --- a/open-vm-tools/lib/rpcIn/rpcin.c | 99 | --- a/open-vm-tools/lib/rpcIn/rpcin.c |
733 | +++ b/open-vm-tools/lib/rpcIn/rpcin.c | 100 | +++ b/open-vm-tools/lib/rpcIn/rpcin.c |
734 | @@ -57,7 +57,7 @@ | 101 | @@ -57,7 +57,7 @@ |
@@ -740,3 +107,6 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
740 | # include "asyncsocket.h" | 107 | # include "asyncsocket.h" |
741 | # include "vmci_defs.h" | 108 | # include "vmci_defs.h" |
742 | #include "dataMap.h" | 109 | #include "dataMap.h" |
110 | -- | ||
111 | 2.27.0 | ||
112 | |||
diff --git a/meta-networking/recipes-support/open-vm-tools/open-vm-tools/0011-Use-uintmax_t-for-handling-rlim_t.patch b/meta-networking/recipes-support/open-vm-tools/open-vm-tools/0011-Use-uintmax_t-for-handling-rlim_t.patch index 0a1d00873..144b5837c 100644 --- a/meta-networking/recipes-support/open-vm-tools/open-vm-tools/0011-Use-uintmax_t-for-handling-rlim_t.patch +++ b/meta-networking/recipes-support/open-vm-tools/open-vm-tools/0011-Use-uintmax_t-for-handling-rlim_t.patch | |||
@@ -1,29 +1,36 @@ | |||
1 | From 18eea61a7a768c6c3b57c6683c7bef7049f0f6ab Mon Sep 17 00:00:00 2001 | 1 | From 4b69d8fd78bf6edbc8b4ace58e621d46071fd8dc Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Wed, 13 Jun 2018 23:37:09 -0700 | 3 | Date: Wed, 24 Mar 2021 17:26:53 -0400 |
4 | Subject: [PATCH] Use uintmax_t for handling rlim_t | 4 | Subject: [PATCH 2/2] Use uintmax_t for handling rlim_t |
5 | 5 | ||
6 | rlimit types are not representable with long or long long | 6 | rlimit types are not representable with long or long long |
7 | formats, therefore use uintmax_t to typecast rlim_t types | 7 | formats, therefore use uintmax_t to typecast rlim_t types |
8 | and use %j to print it | 8 | and use %j to print it |
9 | 9 | ||
10 | Refit patch for open-vm-tools-11.2.5. | ||
11 | |||
10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
13 | Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com> | ||
14 | Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com> | ||
11 | --- | 15 | --- |
12 | open-vm-tools/lib/hgfsServer/hgfsServerLinux.c | 4 ++-- | 16 | open-vm-tools/lib/hgfsServer/hgfsServerLinux.c | 4 ++-- |
13 | 1 file changed, 2 insertions(+), 2 deletions(-) | 17 | 1 file changed, 2 insertions(+), 2 deletions(-) |
14 | 18 | ||
15 | diff --git a/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c b/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c | 19 | diff --git a/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c b/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c |
16 | index 0e6351a9..a2ee1740 100644 | 20 | index ba2e5624..889f730a 100644 |
17 | --- a/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c | 21 | --- a/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c |
18 | +++ b/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c | 22 | +++ b/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c |
19 | @@ -5294,8 +5294,8 @@ HgfsWriteCheckIORange(off_t offset, // IN: | 23 | @@ -5292,8 +5292,8 @@ HgfsWriteCheckIORange(off_t offset, // IN: |
20 | goto exit; | 24 | goto exit; |
21 | } | 25 | } |
22 | 26 | ||
23 | - LOG(6, ("%s: File Size limits: 0x%"FMT64"x 0x%"FMT64"x\n", | 27 | - LOG(6, "%s: File Size limits: 0x%"FMT64"x 0x%"FMT64"x\n", |
24 | - __FUNCTION__, fileSize.rlim_cur, fileSize.rlim_max)); | 28 | - __FUNCTION__, fileSize.rlim_cur, fileSize.rlim_max); |
25 | + LOG(6, ("%s: File Size limits: 0x%jx 0x%jx\n", | 29 | + //LOG(6, ("%s: File Size limits: 0x%jx 0x%jx\n", |
26 | + __FUNCTION__, (uintmax_t)fileSize.rlim_cur, (uintmax_t)fileSize.rlim_max)); | 30 | + // __FUNCTION__, (uintmax_t)fileSize.rlim_cur, (uintmax_t)fileSize.rlim_max)); |
27 | 31 | ||
28 | /* | 32 | /* |
29 | * Check the offset is within the file size range. | 33 | * Check the offset is within the file size range. |
34 | -- | ||
35 | 2.30.2 | ||
36 | |||
diff --git a/meta-networking/recipes-support/open-vm-tools/open-vm-tools_11.0.1.bb b/meta-networking/recipes-support/open-vm-tools/open-vm-tools_11.2.5.bb index 832fab1ea..256949a03 100644 --- a/meta-networking/recipes-support/open-vm-tools/open-vm-tools_11.0.1.bb +++ b/meta-networking/recipes-support/open-vm-tools/open-vm-tools_11.2.5.bb | |||
@@ -11,6 +11,10 @@ | |||
11 | 11 | ||
12 | SUMMARY = "Tools to enhance VMWare guest integration and performance" | 12 | SUMMARY = "Tools to enhance VMWare guest integration and performance" |
13 | HOMEPAGE = "https://github.com/vmware/open-vm-tools" | 13 | HOMEPAGE = "https://github.com/vmware/open-vm-tools" |
14 | DESCRIPTION = "\ | ||
15 | open-vm-tools is a set of services and modules that enable several features in VMware products \ | ||
16 | for better management of and seamless user interactions with guests.\ | ||
17 | " | ||
14 | SECTION = "vmware-tools" | 18 | SECTION = "vmware-tools" |
15 | 19 | ||
16 | LICENSE = "LGPL-2.0 & GPL-2.0 & BSD & CDDL-1.0" | 20 | LICENSE = "LGPL-2.0 & GPL-2.0 & BSD & CDDL-1.0" |
@@ -26,7 +30,6 @@ SRC_URI = "git://github.com/vmware/open-vm-tools.git;protocol=https \ | |||
26 | file://vmtoolsd.service \ | 30 | file://vmtoolsd.service \ |
27 | file://vmtoolsd.init \ | 31 | file://vmtoolsd.init \ |
28 | file://0001-configure.ac-don-t-use-dnet-config.patch;patchdir=.. \ | 32 | file://0001-configure.ac-don-t-use-dnet-config.patch;patchdir=.. \ |
29 | file://0002-add-include-sys-sysmacros.h.patch;patchdir=.. \ | ||
30 | file://0003-Use-configure-test-for-struct-timespec.patch;patchdir=.. \ | 33 | file://0003-Use-configure-test-for-struct-timespec.patch;patchdir=.. \ |
31 | file://0004-Fix-definition-of-ALLPERMS-and-ACCESSPERMS.patch;patchdir=.. \ | 34 | file://0004-Fix-definition-of-ALLPERMS-and-ACCESSPERMS.patch;patchdir=.. \ |
32 | file://0005-Use-configure-to-test-for-feature-instead-of-platfor.patch;patchdir=.. \ | 35 | file://0005-Use-configure-to-test-for-feature-instead-of-platfor.patch;patchdir=.. \ |
@@ -38,15 +41,15 @@ SRC_URI = "git://github.com/vmware/open-vm-tools.git;protocol=https \ | |||
38 | file://0011-Use-uintmax_t-for-handling-rlim_t.patch;patchdir=.. \ | 41 | file://0011-Use-uintmax_t-for-handling-rlim_t.patch;patchdir=.. \ |
39 | file://0012-Use-off64_t-instead-of-__off64_t.patch;patchdir=.. \ | 42 | file://0012-Use-off64_t-instead-of-__off64_t.patch;patchdir=.. \ |
40 | file://0013-misc-Do-not-print-NULL-string-into-logs.patch;patchdir=.. \ | 43 | file://0013-misc-Do-not-print-NULL-string-into-logs.patch;patchdir=.. \ |
41 | file://0001-GitHub-Issue-367.-Remove-references-to-deprecated-G_.patch;patchdir=.. \ | ||
42 | file://0001-Make-HgfsConvertFromNtTimeNsec-aware-of-64-bit-time_.patch;patchdir=.. \ | 44 | file://0001-Make-HgfsConvertFromNtTimeNsec-aware-of-64-bit-time_.patch;patchdir=.. \ |
43 | file://0002-hgfsServerLinux-Consider-64bit-time_t-possibility.patch;patchdir=.. \ | 45 | file://0002-hgfsServerLinux-Consider-64bit-time_t-possibility.patch;patchdir=.. \ |
44 | file://0001-utilBacktrace-Ignore-Warray-bounds.patch;patchdir=.. \ | ||
45 | file://0001-hgfsmounter-Makefile.am-support-usrmerge.patch;patchdir=.. \ | 46 | file://0001-hgfsmounter-Makefile.am-support-usrmerge.patch;patchdir=.. \ |
46 | file://0001-pollGtk-Drop-volatile-qualifier.patch;patchdir=.. \ | ||
47 | " | 47 | " |
48 | 48 | ||
49 | SRCREV = "d3edfd142a81096f9f58aff17d84219b457f4987" | 49 | SRC_URI_append_libc-musl = " file://0001-Add-resolv_compat.h-for-musl-builds.patch;patchdir=.. \ |
50 | " | ||
51 | |||
52 | SRCREV = "7ae57c3c7c1f68c74637ad009673dae94ee52570" | ||
50 | 53 | ||
51 | S = "${WORKDIR}/git/open-vm-tools" | 54 | S = "${WORKDIR}/git/open-vm-tools" |
52 | 55 | ||