summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/systemd/systemd/0011-Use-uintmax_t-for-handling-rlim_t.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/systemd/systemd/0011-Use-uintmax_t-for-handling-rlim_t.patch')
-rw-r--r--meta/recipes-core/systemd/systemd/0011-Use-uintmax_t-for-handling-rlim_t.patch22
1 files changed, 10 insertions, 12 deletions
diff --git a/meta/recipes-core/systemd/systemd/0011-Use-uintmax_t-for-handling-rlim_t.patch b/meta/recipes-core/systemd/systemd/0011-Use-uintmax_t-for-handling-rlim_t.patch
index d6eda9c038..e00600ab7c 100644
--- a/meta/recipes-core/systemd/systemd/0011-Use-uintmax_t-for-handling-rlim_t.patch
+++ b/meta/recipes-core/systemd/systemd/0011-Use-uintmax_t-for-handling-rlim_t.patch
@@ -1,7 +1,7 @@
1From e3f847bd0338d27aff3335b42661d8a4b66b965e Mon Sep 17 00:00:00 2001 1From f6df7f25a6bb00d5540915216adfff8afefec2b0 Mon Sep 17 00:00:00 2001
2From: Chen Qi <Qi.Chen@windriver.com> 2From: Chen Qi <Qi.Chen@windriver.com>
3Date: Mon, 25 Feb 2019 15:12:41 +0800 3Date: Mon, 25 Feb 2019 15:12:41 +0800
4Subject: [PATCH 11/24] Use uintmax_t for handling rlim_t 4Subject: [PATCH] Use uintmax_t for handling rlim_t
5 5
6PRIu{32,64} is not right format to represent rlim_t type 6PRIu{32,64} is not right format to represent rlim_t type
7therefore use %ju and typecast the rlim_t variables to 7therefore use %ju and typecast the rlim_t variables to
@@ -20,6 +20,7 @@ Upstream-Status: Denied [https://github.com/systemd/systemd/pull/7199]
20Signed-off-by: Khem Raj <raj.khem@gmail.com> 20Signed-off-by: Khem Raj <raj.khem@gmail.com>
21[Rebased for v241] 21[Rebased for v241]
22Signed-off-by: Chen Qi <Qi.Chen@windriver.com> 22Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
23
23--- 24---
24 src/basic/format-util.h | 8 +------- 25 src/basic/format-util.h | 8 +-------
25 src/basic/rlimit-util.c | 10 +++++----- 26 src/basic/rlimit-util.c | 10 +++++-----
@@ -27,10 +28,10 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
27 3 files changed, 8 insertions(+), 14 deletions(-) 28 3 files changed, 8 insertions(+), 14 deletions(-)
28 29
29diff --git a/src/basic/format-util.h b/src/basic/format-util.h 30diff --git a/src/basic/format-util.h b/src/basic/format-util.h
30index dece5d3..dbb87bc 100644 31index 59622508a333..779b6826d50e 100644
31--- a/src/basic/format-util.h 32--- a/src/basic/format-util.h
32+++ b/src/basic/format-util.h 33+++ b/src/basic/format-util.h
33@@ -42,13 +42,7 @@ 34@@ -44,13 +44,7 @@
34 # define PRI_TIMEX "li" 35 # define PRI_TIMEX "li"
35 #endif 36 #endif
36 37
@@ -46,10 +47,10 @@ index dece5d3..dbb87bc 100644
46 #if SIZEOF_DEV_T == 8 47 #if SIZEOF_DEV_T == 8
47 # define DEV_FMT "%" PRIu64 48 # define DEV_FMT "%" PRIu64
48diff --git a/src/basic/rlimit-util.c b/src/basic/rlimit-util.c 49diff --git a/src/basic/rlimit-util.c b/src/basic/rlimit-util.c
49index 74b3a02..b02c03c 100644 50index 2dc13eabc30d..0633cc67f417 100644
50--- a/src/basic/rlimit-util.c 51--- a/src/basic/rlimit-util.c
51+++ b/src/basic/rlimit-util.c 52+++ b/src/basic/rlimit-util.c
52@@ -307,13 +307,13 @@ int rlimit_format(const struct rlimit *rl, char **ret) { 53@@ -306,13 +306,13 @@ int rlimit_format(const struct rlimit *rl, char **ret) {
53 if (rl->rlim_cur >= RLIM_INFINITY && rl->rlim_max >= RLIM_INFINITY) 54 if (rl->rlim_cur >= RLIM_INFINITY && rl->rlim_max >= RLIM_INFINITY)
54 s = strdup("infinity"); 55 s = strdup("infinity");
55 else if (rl->rlim_cur >= RLIM_INFINITY) 56 else if (rl->rlim_cur >= RLIM_INFINITY)
@@ -67,7 +68,7 @@ index 74b3a02..b02c03c 100644
67 68
68 if (!s) 69 if (!s)
69 return -ENOMEM; 70 return -ENOMEM;
70@@ -404,7 +404,7 @@ int rlimit_nofile_safe(void) { 71@@ -403,7 +403,7 @@ int rlimit_nofile_safe(void) {
71 72
72 rl.rlim_cur = FD_SETSIZE; 73 rl.rlim_cur = FD_SETSIZE;
73 if (setrlimit(RLIMIT_NOFILE, &rl) < 0) 74 if (setrlimit(RLIMIT_NOFILE, &rl) < 0)
@@ -77,10 +78,10 @@ index 74b3a02..b02c03c 100644
77 return 1; 78 return 1;
78 } 79 }
79diff --git a/src/core/execute.c b/src/core/execute.c 80diff --git a/src/core/execute.c b/src/core/execute.c
80index a708231..e2b8748 100644 81index f04b8ba05002..084cf1420078 100644
81--- a/src/core/execute.c 82--- a/src/core/execute.c
82+++ b/src/core/execute.c 83+++ b/src/core/execute.c
83@@ -4220,9 +4220,9 @@ void exec_context_dump(const ExecContext *c, FILE* f, const char *prefix) { 84@@ -4455,9 +4455,9 @@ void exec_context_dump(const ExecContext *c, FILE* f, const char *prefix) {
84 for (i = 0; i < RLIM_NLIMITS; i++) 85 for (i = 0; i < RLIM_NLIMITS; i++)
85 if (c->rlimit[i]) { 86 if (c->rlimit[i]) {
86 fprintf(f, "%sLimit%s: " RLIM_FMT "\n", 87 fprintf(f, "%sLimit%s: " RLIM_FMT "\n",
@@ -92,6 +93,3 @@ index a708231..e2b8748 100644
92 } 93 }
93 94
94 if (c->ioprio_set) { 95 if (c->ioprio_set) {
95--
962.7.4
97