summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/systemd/systemd/0001-do-not-disable-buffer-in-writing-files.patch
diff options
context:
space:
mode:
authorAlex Kiernan <alex.kiernan@gmail.com>2020-02-06 16:48:13 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-02-08 13:20:02 +0000
commit306820bad60c62a8096df8d1e4c7cc8e00dc38b7 (patch)
tree78fe9e9d90e19ca52f2cc462e1368e90484d4b4d /meta/recipes-core/systemd/systemd/0001-do-not-disable-buffer-in-writing-files.patch
parentcc7164836097a4100dce65e93b24a3a8874f65b3 (diff)
downloadpoky-306820bad60c62a8096df8d1e4c7cc8e00dc38b7.tar.gz
systemd: upgrade 243.4 -> 244.1
Drop 0002-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch a variant on which was introduced in 2c1047310970 ("Upgrade to systemd 211+") in 2014. The oldest supported build machine is now CentOS 7 which has --relative support in ln, so there no longer appears to be any need for this change. Rebase/refresh musl patches: - replace missing.h with specific missing_... header - fix additional WRITE_STRING_FILE_DISABLE_BUFFER - fix more places that need netinet/if_ether.h (From OE-Core rev: 44a4ac2294da0f53cbbfabc7ece836fe97f4d3f7) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/systemd/systemd/0001-do-not-disable-buffer-in-writing-files.patch')
-rw-r--r--meta/recipes-core/systemd/systemd/0001-do-not-disable-buffer-in-writing-files.patch168
1 files changed, 100 insertions, 68 deletions
diff --git a/meta/recipes-core/systemd/systemd/0001-do-not-disable-buffer-in-writing-files.patch b/meta/recipes-core/systemd/systemd/0001-do-not-disable-buffer-in-writing-files.patch
index d6d68a09ac..f1c7181ef9 100644
--- a/meta/recipes-core/systemd/systemd/0001-do-not-disable-buffer-in-writing-files.patch
+++ b/meta/recipes-core/systemd/systemd/0001-do-not-disable-buffer-in-writing-files.patch
@@ -1,4 +1,4 @@
1From 85e3c3046562ec24fc2f09ebfd08bf9f168091d5 Mon Sep 17 00:00:00 2001 1From f4a0caaea346b70cf5064f9159a53a1b8020071e Mon Sep 17 00:00:00 2001
2From: Chen Qi <Qi.Chen@windriver.com> 2From: Chen Qi <Qi.Chen@windriver.com>
3Date: Fri, 1 Mar 2019 15:22:15 +0800 3Date: Fri, 1 Mar 2019 15:22:15 +0800
4Subject: [PATCH] do not disable buffer in writing files 4Subject: [PATCH] do not disable buffer in writing files
@@ -18,8 +18,9 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
18Signed-off-by: Andrej Valek <andrej.valek@siemens.com> 18Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
19[rebased for systemd 243] 19[rebased for systemd 243]
20Signed-off-by: Scott Murray <scott.murray@konsulko.com> 20Signed-off-by: Scott Murray <scott.murray@konsulko.com>
21
21--- 22---
22 src/basic/cgroup-util.c | 14 +++++++------- 23 src/basic/cgroup-util.c | 10 +++++-----
23 src/basic/procfs-util.c | 4 ++-- 24 src/basic/procfs-util.c | 4 ++--
24 src/basic/smack-util.c | 2 +- 25 src/basic/smack-util.c | 2 +-
25 src/basic/util.c | 2 +- 26 src/basic/util.c | 2 +-
@@ -31,25 +32,19 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
31 src/login/logind-dbus.c | 2 +- 32 src/login/logind-dbus.c | 2 +-
32 src/nspawn/nspawn-cgroup.c | 2 +- 33 src/nspawn/nspawn-cgroup.c | 2 +-
33 src/nspawn/nspawn.c | 6 +++--- 34 src/nspawn/nspawn.c | 6 +++---
35 src/shared/cgroup-setup.c | 4 ++--
34 src/shared/sysctl-util.c | 2 +- 36 src/shared/sysctl-util.c | 2 +-
35 src/sleep/sleep.c | 10 +++++----- 37 src/sleep/sleep.c | 8 ++++----
36 src/udev/udevadm-trigger.c | 2 +- 38 src/udev/udevadm-trigger.c | 2 +-
37 src/udev/udevd.c | 2 +- 39 src/udev/udevd.c | 2 +-
38 src/vconsole/vconsole-setup.c | 2 +- 40 src/vconsole/vconsole-setup.c | 2 +-
39 17 files changed, 36 insertions(+), 36 deletions(-) 41 18 files changed, 35 insertions(+), 35 deletions(-)
40 42
43diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c
44index a5141f4cbedd..04c06e7a55cb 100644
41--- a/src/basic/cgroup-util.c 45--- a/src/basic/cgroup-util.c
42+++ b/src/basic/cgroup-util.c 46+++ b/src/basic/cgroup-util.c
43@@ -860,7 +860,7 @@ int cg_attach(const char *controller, co 47@@ -739,7 +739,7 @@ int cg_install_release_agent(const char *controller, const char *agent) {
44
45 xsprintf(c, PID_FMT "\n", pid);
46
47- r = write_string_file(fs, c, WRITE_STRING_FILE_DISABLE_BUFFER);
48+ r = write_string_file(fs, c, 0);
49 if (r < 0)
50 return r;
51
52@@ -1142,7 +1142,7 @@ int cg_install_release_agent(const char
53 48
54 sc = strstrip(contents); 49 sc = strstrip(contents);
55 if (isempty(sc)) { 50 if (isempty(sc)) {
@@ -58,7 +53,7 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
58 if (r < 0) 53 if (r < 0)
59 return r; 54 return r;
60 } else if (!path_equal(sc, agent)) 55 } else if (!path_equal(sc, agent))
61@@ -1160,7 +1160,7 @@ int cg_install_release_agent(const char 56@@ -757,7 +757,7 @@ int cg_install_release_agent(const char *controller, const char *agent) {
62 57
63 sc = strstrip(contents); 58 sc = strstrip(contents);
64 if (streq(sc, "0")) { 59 if (streq(sc, "0")) {
@@ -67,7 +62,7 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
67 if (r < 0) 62 if (r < 0)
68 return r; 63 return r;
69 64
70@@ -1187,7 +1187,7 @@ int cg_uninstall_release_agent(const cha 65@@ -784,7 +784,7 @@ int cg_uninstall_release_agent(const char *controller) {
71 if (r < 0) 66 if (r < 0)
72 return r; 67 return r;
73 68
@@ -76,7 +71,7 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
76 if (r < 0) 71 if (r < 0)
77 return r; 72 return r;
78 73
79@@ -1197,7 +1197,7 @@ int cg_uninstall_release_agent(const cha 74@@ -794,7 +794,7 @@ int cg_uninstall_release_agent(const char *controller) {
80 if (r < 0) 75 if (r < 0)
81 return r; 76 return r;
82 77
@@ -85,7 +80,7 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
85 if (r < 0) 80 if (r < 0)
86 return r; 81 return r;
87 82
88@@ -2053,7 +2053,7 @@ int cg_set_attribute(const char *control 83@@ -1650,7 +1650,7 @@ int cg_set_attribute(const char *controller, const char *path, const char *attri
89 if (r < 0) 84 if (r < 0)
90 return r; 85 return r;
91 86
@@ -94,18 +89,11 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
94 } 89 }
95 90
96 int cg_get_attribute(const char *controller, const char *path, const char *attribute, char **ret) { 91 int cg_get_attribute(const char *controller, const char *path, const char *attribute, char **ret) {
97@@ -2697,7 +2697,7 @@ int cg_enable_everywhere( 92diff --git a/src/basic/procfs-util.c b/src/basic/procfs-util.c
98 return log_debug_errno(errno, "Failed to open cgroup.subtree_control file of %s: %m", p); 93index da7e836f143e..2138f20bcc03 100644
99 }
100
101- r = write_string_stream(f, s, WRITE_STRING_FILE_DISABLE_BUFFER);
102+ r = write_string_stream(f, s, 0);
103 if (r < 0) {
104 log_debug_errno(r, "Failed to %s controller %s for %s (%s): %m",
105 FLAGS_SET(mask, bit) ? "enable" : "disable", n, p, fs);
106--- a/src/basic/procfs-util.c 94--- a/src/basic/procfs-util.c
107+++ b/src/basic/procfs-util.c 95+++ b/src/basic/procfs-util.c
108@@ -86,13 +86,13 @@ int procfs_tasks_set_limit(uint64_t limi 96@@ -86,13 +86,13 @@ int procfs_tasks_set_limit(uint64_t limit) {
109 * decrease it, as threads-max is the much more relevant sysctl. */ 97 * decrease it, as threads-max is the much more relevant sysctl. */
110 if (limit > pid_max-1) { 98 if (limit > pid_max-1) {
111 sprintf(buffer, "%" PRIu64, limit+1); /* Add one, since PID 0 is not a valid PID */ 99 sprintf(buffer, "%" PRIu64, limit+1); /* Add one, since PID 0 is not a valid PID */
@@ -121,9 +109,11 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
121 if (r < 0) { 109 if (r < 0) {
122 uint64_t threads_max; 110 uint64_t threads_max;
123 111
112diff --git a/src/basic/smack-util.c b/src/basic/smack-util.c
113index da9a2139d31a..5e91f5b8f5d9 100644
124--- a/src/basic/smack-util.c 114--- a/src/basic/smack-util.c
125+++ b/src/basic/smack-util.c 115+++ b/src/basic/smack-util.c
126@@ -115,7 +115,7 @@ int mac_smack_apply_pid(pid_t pid, const 116@@ -114,7 +114,7 @@ int mac_smack_apply_pid(pid_t pid, const char *label) {
127 return 0; 117 return 0;
128 118
129 p = procfs_file_alloca(pid, "attr/current"); 119 p = procfs_file_alloca(pid, "attr/current");
@@ -132,9 +122,11 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
132 if (r < 0) 122 if (r < 0)
133 return r; 123 return r;
134 124
125diff --git a/src/basic/util.c b/src/basic/util.c
126index 2b3b3918a32f..aff8d0fcd473 100644
135--- a/src/basic/util.c 127--- a/src/basic/util.c
136+++ b/src/basic/util.c 128+++ b/src/basic/util.c
137@@ -294,7 +294,7 @@ void disable_coredumps(void) { 129@@ -267,7 +267,7 @@ void disable_coredumps(void) {
138 if (detect_container() > 0) 130 if (detect_container() > 0)
139 return; 131 return;
140 132
@@ -143,9 +135,11 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
143 if (r < 0) 135 if (r < 0)
144 log_debug_errno(r, "Failed to turn off coredumps, ignoring: %m"); 136 log_debug_errno(r, "Failed to turn off coredumps, ignoring: %m");
145 } 137 }
138diff --git a/src/binfmt/binfmt.c b/src/binfmt/binfmt.c
139index 7ff844c78c3a..5c5721d7c2f7 100644
146--- a/src/binfmt/binfmt.c 140--- a/src/binfmt/binfmt.c
147+++ b/src/binfmt/binfmt.c 141+++ b/src/binfmt/binfmt.c
148@@ -48,7 +48,7 @@ static int delete_rule(const char *rule) 142@@ -47,7 +47,7 @@ static int delete_rule(const char *rule) {
149 if (!fn) 143 if (!fn)
150 return log_oom(); 144 return log_oom();
151 145
@@ -154,7 +148,7 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
154 } 148 }
155 149
156 static int apply_rule(const char *rule) { 150 static int apply_rule(const char *rule) {
157@@ -56,7 +56,7 @@ static int apply_rule(const char *rule) 151@@ -55,7 +55,7 @@ static int apply_rule(const char *rule) {
158 152
159 (void) delete_rule(rule); 153 (void) delete_rule(rule);
160 154
@@ -163,7 +157,7 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
163 if (r < 0) 157 if (r < 0)
164 return log_error_errno(r, "Failed to add binary format: %m"); 158 return log_error_errno(r, "Failed to add binary format: %m");
165 159
166@@ -213,7 +213,7 @@ static int run(int argc, char *argv[]) { 160@@ -212,7 +212,7 @@ static int run(int argc, char *argv[]) {
167 } 161 }
168 162
169 /* Flush out all rules */ 163 /* Flush out all rules */
@@ -172,9 +166,11 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
172 166
173 STRV_FOREACH(f, files) { 167 STRV_FOREACH(f, files) {
174 k = apply_file(*f, true); 168 k = apply_file(*f, true);
169diff --git a/src/core/main.c b/src/core/main.c
170index c24b696b1663..195be7d2df0d 100644
175--- a/src/core/main.c 171--- a/src/core/main.c
176+++ b/src/core/main.c 172+++ b/src/core/main.c
177@@ -1303,7 +1303,7 @@ static int bump_unix_max_dgram_qlen(void 173@@ -1303,7 +1303,7 @@ static int bump_unix_max_dgram_qlen(void) {
178 if (v >= DEFAULT_UNIX_MAX_DGRAM_QLEN) 174 if (v >= DEFAULT_UNIX_MAX_DGRAM_QLEN)
179 return 0; 175 return 0;
180 176
@@ -183,7 +179,7 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
183 if (r < 0) 179 if (r < 0)
184 return log_full_errno(IN_SET(r, -EROFS, -EPERM, -EACCES) ? LOG_DEBUG : LOG_WARNING, r, 180 return log_full_errno(IN_SET(r, -EROFS, -EPERM, -EACCES) ? LOG_DEBUG : LOG_WARNING, r,
185 "Failed to bump AF_UNIX datagram queue length, ignoring: %m"); 181 "Failed to bump AF_UNIX datagram queue length, ignoring: %m");
186@@ -1527,7 +1527,7 @@ static void initialize_core_pattern(bool 182@@ -1527,7 +1527,7 @@ static void initialize_core_pattern(bool skip_setup) {
187 if (getpid_cached() != 1) 183 if (getpid_cached() != 1)
188 return; 184 return;
189 185
@@ -192,9 +188,11 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
192 if (r < 0) 188 if (r < 0)
193 log_warning_errno(r, "Failed to write '%s' to /proc/sys/kernel/core_pattern, ignoring: %m", arg_early_core_pattern); 189 log_warning_errno(r, "Failed to write '%s' to /proc/sys/kernel/core_pattern, ignoring: %m", arg_early_core_pattern);
194 } 190 }
191diff --git a/src/core/smack-setup.c b/src/core/smack-setup.c
192index 4427397f2715..8aeb5c829513 100644
195--- a/src/core/smack-setup.c 193--- a/src/core/smack-setup.c
196+++ b/src/core/smack-setup.c 194+++ b/src/core/smack-setup.c
197@@ -327,17 +327,17 @@ int mac_smack_setup(bool *loaded_policy) 195@@ -325,17 +325,17 @@ int mac_smack_setup(bool *loaded_policy) {
198 } 196 }
199 197
200 #ifdef SMACK_RUN_LABEL 198 #ifdef SMACK_RUN_LABEL
@@ -216,6 +214,8 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
216 if (r < 0) 214 if (r < 0)
217 log_warning_errno(r, "Failed to set SMACK netlabel rule \"127.0.0.1 -CIPSO\": %m"); 215 log_warning_errno(r, "Failed to set SMACK netlabel rule \"127.0.0.1 -CIPSO\": %m");
218 #endif 216 #endif
217diff --git a/src/hibernate-resume/hibernate-resume.c b/src/hibernate-resume/hibernate-resume.c
218index 17e7cd1a009b..87a766771663 100644
219--- a/src/hibernate-resume/hibernate-resume.c 219--- a/src/hibernate-resume/hibernate-resume.c
220+++ b/src/hibernate-resume/hibernate-resume.c 220+++ b/src/hibernate-resume/hibernate-resume.c
221@@ -45,7 +45,7 @@ int main(int argc, char *argv[]) { 221@@ -45,7 +45,7 @@ int main(int argc, char *argv[]) {
@@ -227,9 +227,11 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
227 if (r < 0) { 227 if (r < 0) {
228 log_error_errno(r, "Failed to write '%s' to /sys/power/resume: %m", major_minor); 228 log_error_errno(r, "Failed to write '%s' to /sys/power/resume: %m", major_minor);
229 return EXIT_FAILURE; 229 return EXIT_FAILURE;
230diff --git a/src/libsystemd/sd-device/sd-device.c b/src/libsystemd/sd-device/sd-device.c
231index f35612fe12bc..20351bf7fa70 100644
230--- a/src/libsystemd/sd-device/sd-device.c 232--- a/src/libsystemd/sd-device/sd-device.c
231+++ b/src/libsystemd/sd-device/sd-device.c 233+++ b/src/libsystemd/sd-device/sd-device.c
232@@ -1849,7 +1849,7 @@ _public_ int sd_device_set_sysattr_value 234@@ -1849,7 +1849,7 @@ _public_ int sd_device_set_sysattr_value(sd_device *device, const char *sysattr,
233 if (!value) 235 if (!value)
234 return -ENOMEM; 236 return -ENOMEM;
235 237
@@ -238,9 +240,11 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
238 if (r < 0) { 240 if (r < 0) {
239 if (r == -ELOOP) 241 if (r == -ELOOP)
240 return -EINVAL; 242 return -EINVAL;
243diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c
244index 69b59948786f..b4973c596d48 100644
241--- a/src/login/logind-dbus.c 245--- a/src/login/logind-dbus.c
242+++ b/src/login/logind-dbus.c 246+++ b/src/login/logind-dbus.c
243@@ -1323,7 +1323,7 @@ static int trigger_device(Manager *m, sd 247@@ -1322,7 +1322,7 @@ static int trigger_device(Manager *m, sd_device *d) {
244 if (!t) 248 if (!t)
245 return -ENOMEM; 249 return -ENOMEM;
246 250
@@ -249,9 +253,11 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
249 } 253 }
250 254
251 return 0; 255 return 0;
256diff --git a/src/nspawn/nspawn-cgroup.c b/src/nspawn/nspawn-cgroup.c
257index f5048d9473cb..b6383ab5c97e 100644
252--- a/src/nspawn/nspawn-cgroup.c 258--- a/src/nspawn/nspawn-cgroup.c
253+++ b/src/nspawn/nspawn-cgroup.c 259+++ b/src/nspawn/nspawn-cgroup.c
254@@ -123,7 +123,7 @@ int sync_cgroup(pid_t pid, CGroupUnified 260@@ -124,7 +124,7 @@ int sync_cgroup(pid_t pid, CGroupUnified unified_requested, uid_t uid_shift) {
255 fn = strjoina(tree, cgroup, "/cgroup.procs"); 261 fn = strjoina(tree, cgroup, "/cgroup.procs");
256 262
257 sprintf(pid_string, PID_FMT, pid); 263 sprintf(pid_string, PID_FMT, pid);
@@ -260,9 +266,11 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
260 if (r < 0) { 266 if (r < 0) {
261 log_error_errno(r, "Failed to move process: %m"); 267 log_error_errno(r, "Failed to move process: %m");
262 goto finish; 268 goto finish;
269diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
270index 873a76596f0b..4e496548bb94 100644
263--- a/src/nspawn/nspawn.c 271--- a/src/nspawn/nspawn.c
264+++ b/src/nspawn/nspawn.c 272+++ b/src/nspawn/nspawn.c
265@@ -2403,7 +2403,7 @@ static int reset_audit_loginuid(void) { 273@@ -2425,7 +2425,7 @@ static int reset_audit_loginuid(void) {
266 if (streq(p, "4294967295")) 274 if (streq(p, "4294967295"))
267 return 0; 275 return 0;
268 276
@@ -271,7 +279,7 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
271 if (r < 0) { 279 if (r < 0) {
272 log_error_errno(r, 280 log_error_errno(r,
273 "Failed to reset audit login UID. This probably means that your kernel is too\n" 281 "Failed to reset audit login UID. This probably means that your kernel is too\n"
274@@ -3612,13 +3612,13 @@ static int setup_uid_map(pid_t pid) { 282@@ -3633,13 +3633,13 @@ static int setup_uid_map(pid_t pid) {
275 283
276 xsprintf(uid_map, "/proc/" PID_FMT "/uid_map", pid); 284 xsprintf(uid_map, "/proc/" PID_FMT "/uid_map", pid);
277 xsprintf(line, UID_FMT " " UID_FMT " " UID_FMT "\n", 0, arg_uid_shift, arg_uid_range); 285 xsprintf(line, UID_FMT " " UID_FMT " " UID_FMT "\n", 0, arg_uid_shift, arg_uid_range);
@@ -287,9 +295,33 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
287 if (r < 0) 295 if (r < 0)
288 return log_error_errno(r, "Failed to write GID map: %m"); 296 return log_error_errno(r, "Failed to write GID map: %m");
289 297
298diff --git a/src/shared/cgroup-setup.c b/src/shared/cgroup-setup.c
299index e8398cbde5ba..ba682ec0c9e7 100644
300--- a/src/shared/cgroup-setup.c
301+++ b/src/shared/cgroup-setup.c
302@@ -267,7 +267,7 @@ int cg_attach(const char *controller, const char *path, pid_t pid) {
303
304 xsprintf(c, PID_FMT "\n", pid);
305
306- r = write_string_file(fs, c, WRITE_STRING_FILE_DISABLE_BUFFER);
307+ r = write_string_file(fs, c, 0);
308 if (r < 0)
309 return r;
310
311@@ -817,7 +817,7 @@ int cg_enable_everywhere(
312 return log_debug_errno(errno, "Failed to open cgroup.subtree_control file of %s: %m", p);
313 }
314
315- r = write_string_stream(f, s, WRITE_STRING_FILE_DISABLE_BUFFER);
316+ r = write_string_stream(f, s, 0);
317 if (r < 0) {
318 log_debug_errno(r, "Failed to %s controller %s for %s (%s): %m",
319 FLAGS_SET(mask, bit) ? "enable" : "disable", n, p, fs);
320diff --git a/src/shared/sysctl-util.c b/src/shared/sysctl-util.c
321index 12fb3ef7ea0e..132ac847c091 100644
290--- a/src/shared/sysctl-util.c 322--- a/src/shared/sysctl-util.c
291+++ b/src/shared/sysctl-util.c 323+++ b/src/shared/sysctl-util.c
292@@ -88,7 +88,7 @@ int sysctl_write_ip_property(int af, con 324@@ -87,7 +87,7 @@ int sysctl_write_ip_property(int af, const char *ifname, const char *property, c
293 325
294 log_debug("Setting '%s' to '%s'", p, value); 326 log_debug("Setting '%s' to '%s'", p, value);
295 327
@@ -298,35 +330,29 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
298 } 330 }
299 331
300 int sysctl_read(const char *property, char **content) { 332 int sysctl_read(const char *property, char **content) {
333diff --git a/src/sleep/sleep.c b/src/sleep/sleep.c
334index 89b80367f8f4..33dbb21364d0 100644
301--- a/src/sleep/sleep.c 335--- a/src/sleep/sleep.c
302+++ b/src/sleep/sleep.c 336+++ b/src/sleep/sleep.c
303@@ -54,7 +54,7 @@ static int write_hibernate_location_info 337@@ -45,7 +45,7 @@ static int write_hibernate_location_info(const HibernateLocation *hibernate_loca
338 assert(hibernate_location->swap);
339 assert(hibernate_location->resume);
304 340
305 /* if it's a swap partition, we just write the disk to /sys/power/resume */ 341- r = write_string_file("/sys/power/resume", hibernate_location->resume, WRITE_STRING_FILE_DISABLE_BUFFER);
306 if (streq(type, "partition")) { 342+ r = write_string_file("/sys/power/resume", hibernate_location->resume, 0);
307- r = write_string_file("/sys/power/resume", device, WRITE_STRING_FILE_DISABLE_BUFFER); 343 if (r < 0)
308+ r = write_string_file("/sys/power/resume", device, 0); 344 return log_debug_errno(r, "Failed to write partition device to /sys/power/resume for '%s': '%s': %m",
309 if (r < 0) 345 hibernate_location->swap->device, hibernate_location->resume);
310 return log_debug_errno(r, "Failed to write partition device to /sys/power/resume: %m"); 346@@ -72,7 +72,7 @@ static int write_hibernate_location_info(const HibernateLocation *hibernate_loca
311 347 }
312@@ -98,14 +98,14 @@ static int write_hibernate_location_info
313 348
314 offset = fiemap->fm_extents[0].fe_physical / page_size(); 349 xsprintf(offset_str, "%" PRIu64, hibernate_location->resume_offset);
315 xsprintf(offset_str, "%" PRIu64, offset);
316- r = write_string_file("/sys/power/resume_offset", offset_str, WRITE_STRING_FILE_DISABLE_BUFFER); 350- r = write_string_file("/sys/power/resume_offset", offset_str, WRITE_STRING_FILE_DISABLE_BUFFER);
317+ r = write_string_file("/sys/power/resume_offset", offset_str, 0); 351+ r = write_string_file("/sys/power/resume_offset", offset_str, 0);
318 if (r < 0) 352 if (r < 0)
319 return log_debug_errno(r, "Failed to write offset '%s': %m", offset_str); 353 return log_debug_errno(r, "Failed to write swap file offset to /sys/power/resume_offset for '%s': '%s': %m",
320 354 hibernate_location->swap->device, offset_str);
321 log_debug("Wrote calculated resume_offset value to /sys/power/resume_offset: %s", offset_str); 355@@ -89,7 +89,7 @@ static int write_mode(char **modes) {
322
323 xsprintf(device_str, "%lx", (unsigned long)stb.st_dev);
324- r = write_string_file("/sys/power/resume", device_str, WRITE_STRING_FILE_DISABLE_BUFFER);
325+ r = write_string_file("/sys/power/resume", device_str, 0);
326 if (r < 0)
327 return log_debug_errno(r, "Failed to write device '%s': %m", device_str);
328
329@@ -121,7 +121,7 @@ static int write_mode(char **modes) {
330 STRV_FOREACH(mode, modes) { 356 STRV_FOREACH(mode, modes) {
331 int k; 357 int k;
332 358
@@ -335,7 +361,7 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
335 if (k >= 0) 361 if (k >= 0)
336 return 0; 362 return 0;
337 363
338@@ -140,7 +140,7 @@ static int write_state(FILE **f, char ** 364@@ -108,7 +108,7 @@ static int write_state(FILE **f, char **states) {
339 STRV_FOREACH(state, states) { 365 STRV_FOREACH(state, states) {
340 int k; 366 int k;
341 367
@@ -344,9 +370,11 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
344 if (k >= 0) 370 if (k >= 0)
345 return 0; 371 return 0;
346 log_debug_errno(k, "Failed to write '%s' to /sys/power/state: %m", *state); 372 log_debug_errno(k, "Failed to write '%s' to /sys/power/state: %m", *state);
373diff --git a/src/udev/udevadm-trigger.c b/src/udev/udevadm-trigger.c
374index 60c68b5029cf..fdca03d3d42c 100644
347--- a/src/udev/udevadm-trigger.c 375--- a/src/udev/udevadm-trigger.c
348+++ b/src/udev/udevadm-trigger.c 376+++ b/src/udev/udevadm-trigger.c
349@@ -43,7 +43,7 @@ static int exec_list(sd_device_enumerato 377@@ -43,7 +43,7 @@ static int exec_list(sd_device_enumerator *e, const char *action, Set *settle_se
350 if (!filename) 378 if (!filename)
351 return log_oom(); 379 return log_oom();
352 380
@@ -355,9 +383,11 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
355 if (r < 0) { 383 if (r < 0) {
356 bool ignore = IN_SET(r, -ENOENT, -EACCES, -ENODEV, -EROFS); 384 bool ignore = IN_SET(r, -ENOENT, -EACCES, -ENODEV, -EROFS);
357 385
386diff --git a/src/udev/udevd.c b/src/udev/udevd.c
387index 7678331897f5..6871cde7aa65 100644
358--- a/src/udev/udevd.c 388--- a/src/udev/udevd.c
359+++ b/src/udev/udevd.c 389+++ b/src/udev/udevd.c
360@@ -1113,7 +1113,7 @@ static int synthesize_change_one(sd_devi 390@@ -1089,7 +1089,7 @@ static int synthesize_change_one(sd_device *dev, const char *syspath) {
361 391
362 filename = strjoina(syspath, "/uevent"); 392 filename = strjoina(syspath, "/uevent");
363 log_device_debug(dev, "device is closed, synthesising 'change' on %s", syspath); 393 log_device_debug(dev, "device is closed, synthesising 'change' on %s", syspath);
@@ -366,9 +396,11 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
366 if (r < 0) 396 if (r < 0)
367 return log_device_debug_errno(dev, r, "Failed to write 'change' to %s: %m", filename); 397 return log_device_debug_errno(dev, r, "Failed to write 'change' to %s: %m", filename);
368 return 0; 398 return 0;
399diff --git a/src/vconsole/vconsole-setup.c b/src/vconsole/vconsole-setup.c
400index 9d706085fb47..30dcfa86f4d0 100644
369--- a/src/vconsole/vconsole-setup.c 401--- a/src/vconsole/vconsole-setup.c
370+++ b/src/vconsole/vconsole-setup.c 402+++ b/src/vconsole/vconsole-setup.c
371@@ -117,7 +117,7 @@ static int toggle_utf8_vc(const char *na 403@@ -116,7 +116,7 @@ static int toggle_utf8_vc(const char *name, int fd, bool utf8) {
372 static int toggle_utf8_sysfs(bool utf8) { 404 static int toggle_utf8_sysfs(bool utf8) {
373 int r; 405 int r;
374 406