summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/systemd/systemd/0001-do-not-disable-buffer-in-writing-files.patch
diff options
context:
space:
mode:
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.patch88
1 files changed, 27 insertions, 61 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 2f4daf8665..d6d68a09ac 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
@@ -38,11 +38,9 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
38 src/vconsole/vconsole-setup.c | 2 +- 38 src/vconsole/vconsole-setup.c | 2 +-
39 17 files changed, 36 insertions(+), 36 deletions(-) 39 17 files changed, 36 insertions(+), 36 deletions(-)
40 40
41diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c
42index 7b5839ccd6..18f6e8ffc8 100644
43--- a/src/basic/cgroup-util.c 41--- a/src/basic/cgroup-util.c
44+++ b/src/basic/cgroup-util.c 42+++ b/src/basic/cgroup-util.c
45@@ -860,7 +860,7 @@ int cg_attach(const char *controller, const char *path, pid_t pid) { 43@@ -860,7 +860,7 @@ int cg_attach(const char *controller, co
46 44
47 xsprintf(c, PID_FMT "\n", pid); 45 xsprintf(c, PID_FMT "\n", pid);
48 46
@@ -51,7 +49,7 @@ index 7b5839ccd6..18f6e8ffc8 100644
51 if (r < 0) 49 if (r < 0)
52 return r; 50 return r;
53 51
54@@ -1142,7 +1142,7 @@ int cg_install_release_agent(const char *controller, const char *agent) { 52@@ -1142,7 +1142,7 @@ int cg_install_release_agent(const char
55 53
56 sc = strstrip(contents); 54 sc = strstrip(contents);
57 if (isempty(sc)) { 55 if (isempty(sc)) {
@@ -60,7 +58,7 @@ index 7b5839ccd6..18f6e8ffc8 100644
60 if (r < 0) 58 if (r < 0)
61 return r; 59 return r;
62 } else if (!path_equal(sc, agent)) 60 } else if (!path_equal(sc, agent))
63@@ -1160,7 +1160,7 @@ int cg_install_release_agent(const char *controller, const char *agent) { 61@@ -1160,7 +1160,7 @@ int cg_install_release_agent(const char
64 62
65 sc = strstrip(contents); 63 sc = strstrip(contents);
66 if (streq(sc, "0")) { 64 if (streq(sc, "0")) {
@@ -69,7 +67,7 @@ index 7b5839ccd6..18f6e8ffc8 100644
69 if (r < 0) 67 if (r < 0)
70 return r; 68 return r;
71 69
72@@ -1187,7 +1187,7 @@ int cg_uninstall_release_agent(const char *controller) { 70@@ -1187,7 +1187,7 @@ int cg_uninstall_release_agent(const cha
73 if (r < 0) 71 if (r < 0)
74 return r; 72 return r;
75 73
@@ -78,7 +76,7 @@ index 7b5839ccd6..18f6e8ffc8 100644
78 if (r < 0) 76 if (r < 0)
79 return r; 77 return r;
80 78
81@@ -1197,7 +1197,7 @@ int cg_uninstall_release_agent(const char *controller) { 79@@ -1197,7 +1197,7 @@ int cg_uninstall_release_agent(const cha
82 if (r < 0) 80 if (r < 0)
83 return r; 81 return r;
84 82
@@ -87,7 +85,7 @@ index 7b5839ccd6..18f6e8ffc8 100644
87 if (r < 0) 85 if (r < 0)
88 return r; 86 return r;
89 87
90@@ -2053,7 +2053,7 @@ int cg_set_attribute(const char *controller, const char *path, const char *attri 88@@ -2053,7 +2053,7 @@ int cg_set_attribute(const char *control
91 if (r < 0) 89 if (r < 0)
92 return r; 90 return r;
93 91
@@ -105,11 +103,9 @@ index 7b5839ccd6..18f6e8ffc8 100644
105 if (r < 0) { 103 if (r < 0) {
106 log_debug_errno(r, "Failed to %s controller %s for %s (%s): %m", 104 log_debug_errno(r, "Failed to %s controller %s for %s (%s): %m",
107 FLAGS_SET(mask, bit) ? "enable" : "disable", n, p, fs); 105 FLAGS_SET(mask, bit) ? "enable" : "disable", n, p, fs);
108diff --git a/src/basic/procfs-util.c b/src/basic/procfs-util.c
109index 42ce53d5aa..57512532a6 100644
110--- a/src/basic/procfs-util.c 106--- a/src/basic/procfs-util.c
111+++ b/src/basic/procfs-util.c 107+++ b/src/basic/procfs-util.c
112@@ -86,13 +86,13 @@ int procfs_tasks_set_limit(uint64_t limit) { 108@@ -86,13 +86,13 @@ int procfs_tasks_set_limit(uint64_t limi
113 * decrease it, as threads-max is the much more relevant sysctl. */ 109 * decrease it, as threads-max is the much more relevant sysctl. */
114 if (limit > pid_max-1) { 110 if (limit > pid_max-1) {
115 sprintf(buffer, "%" PRIu64, limit+1); /* Add one, since PID 0 is not a valid PID */ 111 sprintf(buffer, "%" PRIu64, limit+1); /* Add one, since PID 0 is not a valid PID */
@@ -125,11 +121,9 @@ index 42ce53d5aa..57512532a6 100644
125 if (r < 0) { 121 if (r < 0) {
126 uint64_t threads_max; 122 uint64_t threads_max;
127 123
128diff --git a/src/basic/smack-util.c b/src/basic/smack-util.c
129index 123d00e13e..e7ea78f349 100644
130--- a/src/basic/smack-util.c 124--- a/src/basic/smack-util.c
131+++ b/src/basic/smack-util.c 125+++ b/src/basic/smack-util.c
132@@ -115,7 +115,7 @@ int mac_smack_apply_pid(pid_t pid, const char *label) { 126@@ -115,7 +115,7 @@ int mac_smack_apply_pid(pid_t pid, const
133 return 0; 127 return 0;
134 128
135 p = procfs_file_alloca(pid, "attr/current"); 129 p = procfs_file_alloca(pid, "attr/current");
@@ -138,8 +132,6 @@ index 123d00e13e..e7ea78f349 100644
138 if (r < 0) 132 if (r < 0)
139 return r; 133 return r;
140 134
141diff --git a/src/basic/util.c b/src/basic/util.c
142index 93d610bc98..97dca64f73 100644
143--- a/src/basic/util.c 135--- a/src/basic/util.c
144+++ b/src/basic/util.c 136+++ b/src/basic/util.c
145@@ -294,7 +294,7 @@ void disable_coredumps(void) { 137@@ -294,7 +294,7 @@ void disable_coredumps(void) {
@@ -151,11 +143,9 @@ index 93d610bc98..97dca64f73 100644
151 if (r < 0) 143 if (r < 0)
152 log_debug_errno(r, "Failed to turn off coredumps, ignoring: %m"); 144 log_debug_errno(r, "Failed to turn off coredumps, ignoring: %m");
153 } 145 }
154diff --git a/src/binfmt/binfmt.c b/src/binfmt/binfmt.c
155index aa9d811f2e..8c7f2dae7a 100644
156--- a/src/binfmt/binfmt.c 146--- a/src/binfmt/binfmt.c
157+++ b/src/binfmt/binfmt.c 147+++ b/src/binfmt/binfmt.c
158@@ -48,7 +48,7 @@ static int delete_rule(const char *rule) { 148@@ -48,7 +48,7 @@ static int delete_rule(const char *rule)
159 if (!fn) 149 if (!fn)
160 return log_oom(); 150 return log_oom();
161 151
@@ -164,7 +154,7 @@ index aa9d811f2e..8c7f2dae7a 100644
164 } 154 }
165 155
166 static int apply_rule(const char *rule) { 156 static int apply_rule(const char *rule) {
167@@ -56,7 +56,7 @@ static int apply_rule(const char *rule) { 157@@ -56,7 +56,7 @@ static int apply_rule(const char *rule)
168 158
169 (void) delete_rule(rule); 159 (void) delete_rule(rule);
170 160
@@ -182,11 +172,9 @@ index aa9d811f2e..8c7f2dae7a 100644
182 172
183 STRV_FOREACH(f, files) { 173 STRV_FOREACH(f, files) {
184 k = apply_file(*f, true); 174 k = apply_file(*f, true);
185diff --git a/src/core/main.c b/src/core/main.c
186index bcce7178a8..4199cedab9 100644
187--- a/src/core/main.c 175--- a/src/core/main.c
188+++ b/src/core/main.c 176+++ b/src/core/main.c
189@@ -1285,7 +1285,7 @@ static int bump_unix_max_dgram_qlen(void) { 177@@ -1303,7 +1303,7 @@ static int bump_unix_max_dgram_qlen(void
190 if (v >= DEFAULT_UNIX_MAX_DGRAM_QLEN) 178 if (v >= DEFAULT_UNIX_MAX_DGRAM_QLEN)
191 return 0; 179 return 0;
192 180
@@ -195,7 +183,7 @@ index bcce7178a8..4199cedab9 100644
195 if (r < 0) 183 if (r < 0)
196 return log_full_errno(IN_SET(r, -EROFS, -EPERM, -EACCES) ? LOG_DEBUG : LOG_WARNING, r, 184 return log_full_errno(IN_SET(r, -EROFS, -EPERM, -EACCES) ? LOG_DEBUG : LOG_WARNING, r,
197 "Failed to bump AF_UNIX datagram queue length, ignoring: %m"); 185 "Failed to bump AF_UNIX datagram queue length, ignoring: %m");
198@@ -1509,7 +1509,7 @@ static void initialize_core_pattern(bool skip_setup) { 186@@ -1527,7 +1527,7 @@ static void initialize_core_pattern(bool
199 if (getpid_cached() != 1) 187 if (getpid_cached() != 1)
200 return; 188 return;
201 189
@@ -204,11 +192,9 @@ index bcce7178a8..4199cedab9 100644
204 if (r < 0) 192 if (r < 0)
205 log_warning_errno(r, "Failed to write '%s' to /proc/sys/kernel/core_pattern, ignoring: %m", arg_early_core_pattern); 193 log_warning_errno(r, "Failed to write '%s' to /proc/sys/kernel/core_pattern, ignoring: %m", arg_early_core_pattern);
206 } 194 }
207diff --git a/src/core/smack-setup.c b/src/core/smack-setup.c
208index b95e6239d4..fdbdaaaccb 100644
209--- a/src/core/smack-setup.c 195--- a/src/core/smack-setup.c
210+++ b/src/core/smack-setup.c 196+++ b/src/core/smack-setup.c
211@@ -325,17 +325,17 @@ int mac_smack_setup(bool *loaded_policy) { 197@@ -327,17 +327,17 @@ int mac_smack_setup(bool *loaded_policy)
212 } 198 }
213 199
214 #ifdef SMACK_RUN_LABEL 200 #ifdef SMACK_RUN_LABEL
@@ -230,8 +216,6 @@ index b95e6239d4..fdbdaaaccb 100644
230 if (r < 0) 216 if (r < 0)
231 log_warning_errno(r, "Failed to set SMACK netlabel rule \"127.0.0.1 -CIPSO\": %m"); 217 log_warning_errno(r, "Failed to set SMACK netlabel rule \"127.0.0.1 -CIPSO\": %m");
232 #endif 218 #endif
233diff --git a/src/hibernate-resume/hibernate-resume.c b/src/hibernate-resume/hibernate-resume.c
234index 17e7cd1a00..87a7667716 100644
235--- a/src/hibernate-resume/hibernate-resume.c 219--- a/src/hibernate-resume/hibernate-resume.c
236+++ b/src/hibernate-resume/hibernate-resume.c 220+++ b/src/hibernate-resume/hibernate-resume.c
237@@ -45,7 +45,7 @@ int main(int argc, char *argv[]) { 221@@ -45,7 +45,7 @@ int main(int argc, char *argv[]) {
@@ -243,11 +227,9 @@ index 17e7cd1a00..87a7667716 100644
243 if (r < 0) { 227 if (r < 0) {
244 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);
245 return EXIT_FAILURE; 229 return EXIT_FAILURE;
246diff --git a/src/libsystemd/sd-device/sd-device.c b/src/libsystemd/sd-device/sd-device.c
247index c4a7f2f3d3..bcac758284 100644
248--- a/src/libsystemd/sd-device/sd-device.c 230--- a/src/libsystemd/sd-device/sd-device.c
249+++ b/src/libsystemd/sd-device/sd-device.c 231+++ b/src/libsystemd/sd-device/sd-device.c
250@@ -1849,7 +1849,7 @@ _public_ int sd_device_set_sysattr_value(sd_device *device, const char *sysattr, 232@@ -1849,7 +1849,7 @@ _public_ int sd_device_set_sysattr_value
251 if (!value) 233 if (!value)
252 return -ENOMEM; 234 return -ENOMEM;
253 235
@@ -256,11 +238,9 @@ index c4a7f2f3d3..bcac758284 100644
256 if (r < 0) { 238 if (r < 0) {
257 if (r == -ELOOP) 239 if (r == -ELOOP)
258 return -EINVAL; 240 return -EINVAL;
259diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c
260index 30b9a66334..cc1d577933 100644
261--- a/src/login/logind-dbus.c 241--- a/src/login/logind-dbus.c
262+++ b/src/login/logind-dbus.c 242+++ b/src/login/logind-dbus.c
263@@ -1325,7 +1325,7 @@ static int trigger_device(Manager *m, sd_device *d) { 243@@ -1323,7 +1323,7 @@ static int trigger_device(Manager *m, sd
264 if (!t) 244 if (!t)
265 return -ENOMEM; 245 return -ENOMEM;
266 246
@@ -269,11 +249,9 @@ index 30b9a66334..cc1d577933 100644
269 } 249 }
270 250
271 return 0; 251 return 0;
272diff --git a/src/nspawn/nspawn-cgroup.c b/src/nspawn/nspawn-cgroup.c
273index 0462b46413..7c53d41483 100644
274--- a/src/nspawn/nspawn-cgroup.c 252--- a/src/nspawn/nspawn-cgroup.c
275+++ b/src/nspawn/nspawn-cgroup.c 253+++ b/src/nspawn/nspawn-cgroup.c
276@@ -123,7 +123,7 @@ int sync_cgroup(pid_t pid, CGroupUnified unified_requested, uid_t uid_shift) { 254@@ -123,7 +123,7 @@ int sync_cgroup(pid_t pid, CGroupUnified
277 fn = strjoina(tree, cgroup, "/cgroup.procs"); 255 fn = strjoina(tree, cgroup, "/cgroup.procs");
278 256
279 sprintf(pid_string, PID_FMT, pid); 257 sprintf(pid_string, PID_FMT, pid);
@@ -282,11 +260,9 @@ index 0462b46413..7c53d41483 100644
282 if (r < 0) { 260 if (r < 0) {
283 log_error_errno(r, "Failed to move process: %m"); 261 log_error_errno(r, "Failed to move process: %m");
284 goto finish; 262 goto finish;
285diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
286index 2aec8041f0..841542f2f3 100644
287--- a/src/nspawn/nspawn.c 263--- a/src/nspawn/nspawn.c
288+++ b/src/nspawn/nspawn.c 264+++ b/src/nspawn/nspawn.c
289@@ -2357,7 +2357,7 @@ static int reset_audit_loginuid(void) { 265@@ -2403,7 +2403,7 @@ static int reset_audit_loginuid(void) {
290 if (streq(p, "4294967295")) 266 if (streq(p, "4294967295"))
291 return 0; 267 return 0;
292 268
@@ -295,7 +271,7 @@ index 2aec8041f0..841542f2f3 100644
295 if (r < 0) { 271 if (r < 0) {
296 log_error_errno(r, 272 log_error_errno(r,
297 "Failed to reset audit login UID. This probably means that your kernel is too\n" 273 "Failed to reset audit login UID. This probably means that your kernel is too\n"
298@@ -3566,13 +3566,13 @@ static int setup_uid_map(pid_t pid) { 274@@ -3612,13 +3612,13 @@ static int setup_uid_map(pid_t pid) {
299 275
300 xsprintf(uid_map, "/proc/" PID_FMT "/uid_map", pid); 276 xsprintf(uid_map, "/proc/" PID_FMT "/uid_map", pid);
301 xsprintf(line, UID_FMT " " UID_FMT " " UID_FMT "\n", 0, arg_uid_shift, arg_uid_range); 277 xsprintf(line, UID_FMT " " UID_FMT " " UID_FMT "\n", 0, arg_uid_shift, arg_uid_range);
@@ -311,11 +287,9 @@ index 2aec8041f0..841542f2f3 100644
311 if (r < 0) 287 if (r < 0)
312 return log_error_errno(r, "Failed to write GID map: %m"); 288 return log_error_errno(r, "Failed to write GID map: %m");
313 289
314diff --git a/src/shared/sysctl-util.c b/src/shared/sysctl-util.c
315index 93bdcf11bf..68cddb7a9f 100644
316--- a/src/shared/sysctl-util.c 290--- a/src/shared/sysctl-util.c
317+++ b/src/shared/sysctl-util.c 291+++ b/src/shared/sysctl-util.c
318@@ -88,7 +88,7 @@ int sysctl_write_ip_property(int af, const char *ifname, const char *property, c 292@@ -88,7 +88,7 @@ int sysctl_write_ip_property(int af, con
319 293
320 log_debug("Setting '%s' to '%s'", p, value); 294 log_debug("Setting '%s' to '%s'", p, value);
321 295
@@ -324,11 +298,9 @@ index 93bdcf11bf..68cddb7a9f 100644
324 } 298 }
325 299
326 int sysctl_read(const char *property, char **content) { 300 int sysctl_read(const char *property, char **content) {
327diff --git a/src/sleep/sleep.c b/src/sleep/sleep.c
328index b9fe96635d..f168d7f890 100644
329--- a/src/sleep/sleep.c 301--- a/src/sleep/sleep.c
330+++ b/src/sleep/sleep.c 302+++ b/src/sleep/sleep.c
331@@ -54,7 +54,7 @@ static int write_hibernate_location_info(void) { 303@@ -54,7 +54,7 @@ static int write_hibernate_location_info
332 304
333 /* if it's a swap partition, we just write the disk to /sys/power/resume */ 305 /* if it's a swap partition, we just write the disk to /sys/power/resume */
334 if (streq(type, "partition")) { 306 if (streq(type, "partition")) {
@@ -337,7 +309,7 @@ index b9fe96635d..f168d7f890 100644
337 if (r < 0) 309 if (r < 0)
338 return log_debug_errno(r, "Failed to write partition device to /sys/power/resume: %m"); 310 return log_debug_errno(r, "Failed to write partition device to /sys/power/resume: %m");
339 311
340@@ -98,14 +98,14 @@ static int write_hibernate_location_info(void) { 312@@ -98,14 +98,14 @@ static int write_hibernate_location_info
341 313
342 offset = fiemap->fm_extents[0].fe_physical / page_size(); 314 offset = fiemap->fm_extents[0].fe_physical / page_size();
343 xsprintf(offset_str, "%" PRIu64, offset); 315 xsprintf(offset_str, "%" PRIu64, offset);
@@ -363,7 +335,7 @@ index b9fe96635d..f168d7f890 100644
363 if (k >= 0) 335 if (k >= 0)
364 return 0; 336 return 0;
365 337
366@@ -140,7 +140,7 @@ static int write_state(FILE **f, char **states) { 338@@ -140,7 +140,7 @@ static int write_state(FILE **f, char **
367 STRV_FOREACH(state, states) { 339 STRV_FOREACH(state, states) {
368 int k; 340 int k;
369 341
@@ -372,24 +344,20 @@ index b9fe96635d..f168d7f890 100644
372 if (k >= 0) 344 if (k >= 0)
373 return 0; 345 return 0;
374 log_debug_errno(k, "Failed to write '%s' to /sys/power/state: %m", *state); 346 log_debug_errno(k, "Failed to write '%s' to /sys/power/state: %m", *state);
375diff --git a/src/udev/udevadm-trigger.c b/src/udev/udevadm-trigger.c
376index 77d95e513f..25ce4abfb1 100644
377--- a/src/udev/udevadm-trigger.c 347--- a/src/udev/udevadm-trigger.c
378+++ b/src/udev/udevadm-trigger.c 348+++ b/src/udev/udevadm-trigger.c
379@@ -43,7 +43,7 @@ static int exec_list(sd_device_enumerator *e, const char *action, Set *settle_se 349@@ -43,7 +43,7 @@ static int exec_list(sd_device_enumerato
380 if (!filename) 350 if (!filename)
381 return log_oom(); 351 return log_oom();
382 352
383- r = write_string_file(filename, action, WRITE_STRING_FILE_DISABLE_BUFFER); 353- r = write_string_file(filename, action, WRITE_STRING_FILE_DISABLE_BUFFER);
384+ r = write_string_file(filename, action, 0); 354+ r = write_string_file(filename, action, 0);
385 if (r < 0) { 355 if (r < 0) {
386 log_full_errno(r == -ENOENT ? LOG_DEBUG : LOG_ERR, r, 356 bool ignore = IN_SET(r, -ENOENT, -EACCES, -ENODEV, -EROFS);
387 "Failed to write '%s' to '%s': %m", action, filename); 357
388diff --git a/src/udev/udevd.c b/src/udev/udevd.c
389index cb5123042a..ea309a9e7f 100644
390--- a/src/udev/udevd.c 358--- a/src/udev/udevd.c
391+++ b/src/udev/udevd.c 359+++ b/src/udev/udevd.c
392@@ -1113,7 +1113,7 @@ static int synthesize_change_one(sd_device *dev, const char *syspath) { 360@@ -1113,7 +1113,7 @@ static int synthesize_change_one(sd_devi
393 361
394 filename = strjoina(syspath, "/uevent"); 362 filename = strjoina(syspath, "/uevent");
395 log_device_debug(dev, "device is closed, synthesising 'change' on %s", syspath); 363 log_device_debug(dev, "device is closed, synthesising 'change' on %s", syspath);
@@ -398,11 +366,9 @@ index cb5123042a..ea309a9e7f 100644
398 if (r < 0) 366 if (r < 0)
399 return log_device_debug_errno(dev, r, "Failed to write 'change' to %s: %m", filename); 367 return log_device_debug_errno(dev, r, "Failed to write 'change' to %s: %m", filename);
400 return 0; 368 return 0;
401diff --git a/src/vconsole/vconsole-setup.c b/src/vconsole/vconsole-setup.c
402index 75d052ae70..5a15c939d8 100644
403--- a/src/vconsole/vconsole-setup.c 369--- a/src/vconsole/vconsole-setup.c
404+++ b/src/vconsole/vconsole-setup.c 370+++ b/src/vconsole/vconsole-setup.c
405@@ -117,7 +117,7 @@ static int toggle_utf8_vc(const char *name, int fd, bool utf8) { 371@@ -117,7 +117,7 @@ static int toggle_utf8_vc(const char *na
406 static int toggle_utf8_sysfs(bool utf8) { 372 static int toggle_utf8_sysfs(bool utf8) {
407 int r; 373 int r;
408 374