blob: 36d0c641ae1eb65f75d88204348f26945552cda0 [file] [log] [blame]
Patrick Williams2194f502022-10-16 14:26:09 -05001From b44d1d4e4ba77f1d9cf7de73a3bd210d02b5ff36 Mon Sep 17 00:00:00 2001
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08002From: Khem Raj <raj.khem@gmail.com>
Andrew Geisslere34f8962021-04-15 15:53:51 -05003Date: Wed, 24 Mar 2021 17:26:53 -0400
Patrick Williams2194f502022-10-16 14:26:09 -05004Subject: [PATCH] Use uintmax_t for handling rlim_t
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08005
6rlimit types are not representable with long or long long
7formats, therefore use uintmax_t to typecast rlim_t types
8and use %j to print it
9
Andrew Geisslere34f8962021-04-15 15:53:51 -050010Refit patch for open-vm-tools-11.2.5.
11
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080012Signed-off-by: Khem Raj <raj.khem@gmail.com>
Andrew Geisslere34f8962021-04-15 15:53:51 -050013Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
14Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com>
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080015---
16 open-vm-tools/lib/hgfsServer/hgfsServerLinux.c | 4 ++--
17 1 file changed, 2 insertions(+), 2 deletions(-)
18
Brad Bishop15ae2502019-06-18 21:44:24 -040019diff --git a/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c b/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c
Patrick Williams2194f502022-10-16 14:26:09 -050020index 87d419a7b..f5cc80b76 100644
Brad Bishop15ae2502019-06-18 21:44:24 -040021--- a/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c
22+++ b/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c
Patrick Williams2194f502022-10-16 14:26:09 -050023@@ -5301,8 +5301,8 @@ HgfsWriteCheckIORange(off_t offset, // IN:
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080024 goto exit;
25 }
26
Andrew Geisslere34f8962021-04-15 15:53:51 -050027- LOG(6, "%s: File Size limits: 0x%"FMT64"x 0x%"FMT64"x\n",
28- __FUNCTION__, fileSize.rlim_cur, fileSize.rlim_max);
29+ //LOG(6, ("%s: File Size limits: 0x%jx 0x%jx\n",
30+ // __FUNCTION__, (uintmax_t)fileSize.rlim_cur, (uintmax_t)fileSize.rlim_max));
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080031
32 /*
33 * Check the offset is within the file size range.
Andrew Geisslere34f8962021-04-15 15:53:51 -050034--
Patrick Williams2194f502022-10-16 14:26:09 -0500352.25.1
Andrew Geisslere34f8962021-04-15 15:53:51 -050036