diff options
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.patch | 148 |
1 files changed, 61 insertions, 87 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 68ca604d6d..2f4daf8665 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 | |||
@@ -16,6 +16,8 @@ Upstream-Status: Inappropriate [musl] | |||
16 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | 16 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> |
17 | [Rebased for v242] | 17 | [Rebased for v242] |
18 | Signed-off-by: Andrej Valek <andrej.valek@siemens.com> | 18 | Signed-off-by: Andrej Valek <andrej.valek@siemens.com> |
19 | [rebased for systemd 243] | ||
20 | Signed-off-by: Scott Murray <scott.murray@konsulko.com> | ||
19 | --- | 21 | --- |
20 | src/basic/cgroup-util.c | 14 +++++++------- | 22 | src/basic/cgroup-util.c | 14 +++++++------- |
21 | src/basic/procfs-util.c | 4 ++-- | 23 | src/basic/procfs-util.c | 4 ++-- |
@@ -30,17 +32,17 @@ Signed-off-by: Andrej Valek <andrej.valek@siemens.com> | |||
30 | src/nspawn/nspawn-cgroup.c | 2 +- | 32 | src/nspawn/nspawn-cgroup.c | 2 +- |
31 | src/nspawn/nspawn.c | 6 +++--- | 33 | src/nspawn/nspawn.c | 6 +++--- |
32 | src/shared/sysctl-util.c | 2 +- | 34 | src/shared/sysctl-util.c | 2 +- |
33 | src/sleep/sleep.c | 12 ++++++------ | 35 | src/sleep/sleep.c | 10 +++++----- |
34 | src/udev/udevadm-trigger.c | 2 +- | 36 | src/udev/udevadm-trigger.c | 2 +- |
35 | src/udev/udevd.c | 6 +++--- | 37 | src/udev/udevd.c | 2 +- |
36 | src/vconsole/vconsole-setup.c | 2 +- | 38 | src/vconsole/vconsole-setup.c | 2 +- |
37 | 17 files changed, 39 insertions(+), 39 deletions(-) | 39 | 17 files changed, 36 insertions(+), 36 deletions(-) |
38 | 40 | ||
39 | diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c | 41 | diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c |
40 | index fc28109..44fe985 100644 | 42 | index 7b5839ccd6..18f6e8ffc8 100644 |
41 | --- a/src/basic/cgroup-util.c | 43 | --- a/src/basic/cgroup-util.c |
42 | +++ b/src/basic/cgroup-util.c | 44 | +++ b/src/basic/cgroup-util.c |
43 | @@ -822,7 +822,7 @@ int cg_attach(const char *controller, const char *path, pid_t pid) { | 45 | @@ -860,7 +860,7 @@ int cg_attach(const char *controller, const char *path, pid_t pid) { |
44 | 46 | ||
45 | xsprintf(c, PID_FMT "\n", pid); | 47 | xsprintf(c, PID_FMT "\n", pid); |
46 | 48 | ||
@@ -49,7 +51,7 @@ index fc28109..44fe985 100644 | |||
49 | if (r < 0) | 51 | if (r < 0) |
50 | return r; | 52 | return r; |
51 | 53 | ||
52 | @@ -1104,7 +1104,7 @@ int cg_install_release_agent(const char *controller, const char *agent) { | 54 | @@ -1142,7 +1142,7 @@ int cg_install_release_agent(const char *controller, const char *agent) { |
53 | 55 | ||
54 | sc = strstrip(contents); | 56 | sc = strstrip(contents); |
55 | if (isempty(sc)) { | 57 | if (isempty(sc)) { |
@@ -58,7 +60,7 @@ index fc28109..44fe985 100644 | |||
58 | if (r < 0) | 60 | if (r < 0) |
59 | return r; | 61 | return r; |
60 | } else if (!path_equal(sc, agent)) | 62 | } else if (!path_equal(sc, agent)) |
61 | @@ -1122,7 +1122,7 @@ int cg_install_release_agent(const char *controller, const char *agent) { | 63 | @@ -1160,7 +1160,7 @@ int cg_install_release_agent(const char *controller, const char *agent) { |
62 | 64 | ||
63 | sc = strstrip(contents); | 65 | sc = strstrip(contents); |
64 | if (streq(sc, "0")) { | 66 | if (streq(sc, "0")) { |
@@ -67,7 +69,7 @@ index fc28109..44fe985 100644 | |||
67 | if (r < 0) | 69 | if (r < 0) |
68 | return r; | 70 | return r; |
69 | 71 | ||
70 | @@ -1149,7 +1149,7 @@ int cg_uninstall_release_agent(const char *controller) { | 72 | @@ -1187,7 +1187,7 @@ int cg_uninstall_release_agent(const char *controller) { |
71 | if (r < 0) | 73 | if (r < 0) |
72 | return r; | 74 | return r; |
73 | 75 | ||
@@ -76,7 +78,7 @@ index fc28109..44fe985 100644 | |||
76 | if (r < 0) | 78 | if (r < 0) |
77 | return r; | 79 | return r; |
78 | 80 | ||
79 | @@ -1159,7 +1159,7 @@ int cg_uninstall_release_agent(const char *controller) { | 81 | @@ -1197,7 +1197,7 @@ int cg_uninstall_release_agent(const char *controller) { |
80 | if (r < 0) | 82 | if (r < 0) |
81 | return r; | 83 | return r; |
82 | 84 | ||
@@ -85,7 +87,7 @@ index fc28109..44fe985 100644 | |||
85 | if (r < 0) | 87 | if (r < 0) |
86 | return r; | 88 | return r; |
87 | 89 | ||
88 | @@ -2016,7 +2016,7 @@ int cg_set_attribute(const char *controller, const char *path, const char *attri | 90 | @@ -2053,7 +2053,7 @@ int cg_set_attribute(const char *controller, const char *path, const char *attri |
89 | if (r < 0) | 91 | if (r < 0) |
90 | return r; | 92 | return r; |
91 | 93 | ||
@@ -94,7 +96,7 @@ index fc28109..44fe985 100644 | |||
94 | } | 96 | } |
95 | 97 | ||
96 | int cg_get_attribute(const char *controller, const char *path, const char *attribute, char **ret) { | 98 | int cg_get_attribute(const char *controller, const char *path, const char *attribute, char **ret) { |
97 | @@ -2664,7 +2664,7 @@ int cg_enable_everywhere( | 99 | @@ -2697,7 +2697,7 @@ int cg_enable_everywhere( |
98 | return log_debug_errno(errno, "Failed to open cgroup.subtree_control file of %s: %m", p); | 100 | return log_debug_errno(errno, "Failed to open cgroup.subtree_control file of %s: %m", p); |
99 | } | 101 | } |
100 | 102 | ||
@@ -104,10 +106,10 @@ index fc28109..44fe985 100644 | |||
104 | log_debug_errno(r, "Failed to %s controller %s for %s (%s): %m", | 106 | log_debug_errno(r, "Failed to %s controller %s for %s (%s): %m", |
105 | FLAGS_SET(mask, bit) ? "enable" : "disable", n, p, fs); | 107 | FLAGS_SET(mask, bit) ? "enable" : "disable", n, p, fs); |
106 | diff --git a/src/basic/procfs-util.c b/src/basic/procfs-util.c | 108 | diff --git a/src/basic/procfs-util.c b/src/basic/procfs-util.c |
107 | index 7aaf95b..25fc3de 100644 | 109 | index 42ce53d5aa..57512532a6 100644 |
108 | --- a/src/basic/procfs-util.c | 110 | --- a/src/basic/procfs-util.c |
109 | +++ b/src/basic/procfs-util.c | 111 | +++ b/src/basic/procfs-util.c |
110 | @@ -85,13 +85,13 @@ int procfs_tasks_set_limit(uint64_t limit) { | 112 | @@ -86,13 +86,13 @@ int procfs_tasks_set_limit(uint64_t limit) { |
111 | * decrease it, as threads-max is the much more relevant sysctl. */ | 113 | * decrease it, as threads-max is the much more relevant sysctl. */ |
112 | if (limit > pid_max-1) { | 114 | if (limit > pid_max-1) { |
113 | sprintf(buffer, "%" PRIu64, limit+1); /* Add one, since PID 0 is not a valid PID */ | 115 | sprintf(buffer, "%" PRIu64, limit+1); /* Add one, since PID 0 is not a valid PID */ |
@@ -124,7 +126,7 @@ index 7aaf95b..25fc3de 100644 | |||
124 | uint64_t threads_max; | 126 | uint64_t threads_max; |
125 | 127 | ||
126 | diff --git a/src/basic/smack-util.c b/src/basic/smack-util.c | 128 | diff --git a/src/basic/smack-util.c b/src/basic/smack-util.c |
127 | index 123d00e..e7ea78f 100644 | 129 | index 123d00e13e..e7ea78f349 100644 |
128 | --- a/src/basic/smack-util.c | 130 | --- a/src/basic/smack-util.c |
129 | +++ b/src/basic/smack-util.c | 131 | +++ b/src/basic/smack-util.c |
130 | @@ -115,7 +115,7 @@ int mac_smack_apply_pid(pid_t pid, const char *label) { | 132 | @@ -115,7 +115,7 @@ int mac_smack_apply_pid(pid_t pid, const char *label) { |
@@ -137,7 +139,7 @@ index 123d00e..e7ea78f 100644 | |||
137 | return r; | 139 | return r; |
138 | 140 | ||
139 | diff --git a/src/basic/util.c b/src/basic/util.c | 141 | diff --git a/src/basic/util.c b/src/basic/util.c |
140 | index 93d610b..97dca64 100644 | 142 | index 93d610bc98..97dca64f73 100644 |
141 | --- a/src/basic/util.c | 143 | --- a/src/basic/util.c |
142 | +++ b/src/basic/util.c | 144 | +++ b/src/basic/util.c |
143 | @@ -294,7 +294,7 @@ void disable_coredumps(void) { | 145 | @@ -294,7 +294,7 @@ void disable_coredumps(void) { |
@@ -150,7 +152,7 @@ index 93d610b..97dca64 100644 | |||
150 | log_debug_errno(r, "Failed to turn off coredumps, ignoring: %m"); | 152 | log_debug_errno(r, "Failed to turn off coredumps, ignoring: %m"); |
151 | } | 153 | } |
152 | diff --git a/src/binfmt/binfmt.c b/src/binfmt/binfmt.c | 154 | diff --git a/src/binfmt/binfmt.c b/src/binfmt/binfmt.c |
153 | index 66e2f01..5daa43b 100644 | 155 | index aa9d811f2e..8c7f2dae7a 100644 |
154 | --- a/src/binfmt/binfmt.c | 156 | --- a/src/binfmt/binfmt.c |
155 | +++ b/src/binfmt/binfmt.c | 157 | +++ b/src/binfmt/binfmt.c |
156 | @@ -48,7 +48,7 @@ static int delete_rule(const char *rule) { | 158 | @@ -48,7 +48,7 @@ static int delete_rule(const char *rule) { |
@@ -175,16 +177,16 @@ index 66e2f01..5daa43b 100644 | |||
175 | } | 177 | } |
176 | 178 | ||
177 | /* Flush out all rules */ | 179 | /* Flush out all rules */ |
178 | - write_string_file("/proc/sys/fs/binfmt_misc/status", "-1", WRITE_STRING_FILE_DISABLE_BUFFER); | 180 | - (void) write_string_file("/proc/sys/fs/binfmt_misc/status", "-1", WRITE_STRING_FILE_DISABLE_BUFFER); |
179 | + write_string_file("/proc/sys/fs/binfmt_misc/status", "-1", 0); | 181 | + (void) write_string_file("/proc/sys/fs/binfmt_misc/status", "-1", 0); |
180 | 182 | ||
181 | STRV_FOREACH(f, files) { | 183 | STRV_FOREACH(f, files) { |
182 | k = apply_file(*f, true); | 184 | k = apply_file(*f, true); |
183 | diff --git a/src/core/main.c b/src/core/main.c | 185 | diff --git a/src/core/main.c b/src/core/main.c |
184 | index 46db471..726ccaf 100644 | 186 | index bcce7178a8..4199cedab9 100644 |
185 | --- a/src/core/main.c | 187 | --- a/src/core/main.c |
186 | +++ b/src/core/main.c | 188 | +++ b/src/core/main.c |
187 | @@ -1469,7 +1469,7 @@ static int bump_unix_max_dgram_qlen(void) { | 189 | @@ -1285,7 +1285,7 @@ static int bump_unix_max_dgram_qlen(void) { |
188 | if (v >= DEFAULT_UNIX_MAX_DGRAM_QLEN) | 190 | if (v >= DEFAULT_UNIX_MAX_DGRAM_QLEN) |
189 | return 0; | 191 | return 0; |
190 | 192 | ||
@@ -193,7 +195,7 @@ index 46db471..726ccaf 100644 | |||
193 | if (r < 0) | 195 | if (r < 0) |
194 | return log_full_errno(IN_SET(r, -EROFS, -EPERM, -EACCES) ? LOG_DEBUG : LOG_WARNING, r, | 196 | return log_full_errno(IN_SET(r, -EROFS, -EPERM, -EACCES) ? LOG_DEBUG : LOG_WARNING, r, |
195 | "Failed to bump AF_UNIX datagram queue length, ignoring: %m"); | 197 | "Failed to bump AF_UNIX datagram queue length, ignoring: %m"); |
196 | @@ -1684,7 +1684,7 @@ static void initialize_core_pattern(bool skip_setup) { | 198 | @@ -1509,7 +1509,7 @@ static void initialize_core_pattern(bool skip_setup) { |
197 | if (getpid_cached() != 1) | 199 | if (getpid_cached() != 1) |
198 | return; | 200 | return; |
199 | 201 | ||
@@ -203,10 +205,10 @@ index 46db471..726ccaf 100644 | |||
203 | log_warning_errno(r, "Failed to write '%s' to /proc/sys/kernel/core_pattern, ignoring: %m", arg_early_core_pattern); | 205 | log_warning_errno(r, "Failed to write '%s' to /proc/sys/kernel/core_pattern, ignoring: %m", arg_early_core_pattern); |
204 | } | 206 | } |
205 | diff --git a/src/core/smack-setup.c b/src/core/smack-setup.c | 207 | diff --git a/src/core/smack-setup.c b/src/core/smack-setup.c |
206 | index cd7fb01..077e861 100644 | 208 | index b95e6239d4..fdbdaaaccb 100644 |
207 | --- a/src/core/smack-setup.c | 209 | --- a/src/core/smack-setup.c |
208 | +++ b/src/core/smack-setup.c | 210 | +++ b/src/core/smack-setup.c |
209 | @@ -351,17 +351,17 @@ int mac_smack_setup(bool *loaded_policy) { | 211 | @@ -325,17 +325,17 @@ int mac_smack_setup(bool *loaded_policy) { |
210 | } | 212 | } |
211 | 213 | ||
212 | #ifdef SMACK_RUN_LABEL | 214 | #ifdef SMACK_RUN_LABEL |
@@ -229,7 +231,7 @@ index cd7fb01..077e861 100644 | |||
229 | log_warning_errno(r, "Failed to set SMACK netlabel rule \"127.0.0.1 -CIPSO\": %m"); | 231 | log_warning_errno(r, "Failed to set SMACK netlabel rule \"127.0.0.1 -CIPSO\": %m"); |
230 | #endif | 232 | #endif |
231 | diff --git a/src/hibernate-resume/hibernate-resume.c b/src/hibernate-resume/hibernate-resume.c | 233 | diff --git a/src/hibernate-resume/hibernate-resume.c b/src/hibernate-resume/hibernate-resume.c |
232 | index 17e7cd1..87a7667 100644 | 234 | index 17e7cd1a00..87a7667716 100644 |
233 | --- a/src/hibernate-resume/hibernate-resume.c | 235 | --- a/src/hibernate-resume/hibernate-resume.c |
234 | +++ b/src/hibernate-resume/hibernate-resume.c | 236 | +++ b/src/hibernate-resume/hibernate-resume.c |
235 | @@ -45,7 +45,7 @@ int main(int argc, char *argv[]) { | 237 | @@ -45,7 +45,7 @@ int main(int argc, char *argv[]) { |
@@ -242,10 +244,10 @@ index 17e7cd1..87a7667 100644 | |||
242 | log_error_errno(r, "Failed to write '%s' to /sys/power/resume: %m", major_minor); | 244 | log_error_errno(r, "Failed to write '%s' to /sys/power/resume: %m", major_minor); |
243 | return EXIT_FAILURE; | 245 | return EXIT_FAILURE; |
244 | diff --git a/src/libsystemd/sd-device/sd-device.c b/src/libsystemd/sd-device/sd-device.c | 246 | diff --git a/src/libsystemd/sd-device/sd-device.c b/src/libsystemd/sd-device/sd-device.c |
245 | index c2315c0..00f81b4 100644 | 247 | index c4a7f2f3d3..bcac758284 100644 |
246 | --- a/src/libsystemd/sd-device/sd-device.c | 248 | --- a/src/libsystemd/sd-device/sd-device.c |
247 | +++ b/src/libsystemd/sd-device/sd-device.c | 249 | +++ b/src/libsystemd/sd-device/sd-device.c |
248 | @@ -1852,7 +1852,7 @@ _public_ int sd_device_set_sysattr_value(sd_device *device, const char *sysattr, | 250 | @@ -1849,7 +1849,7 @@ _public_ int sd_device_set_sysattr_value(sd_device *device, const char *sysattr, |
249 | if (!value) | 251 | if (!value) |
250 | return -ENOMEM; | 252 | return -ENOMEM; |
251 | 253 | ||
@@ -255,10 +257,10 @@ index c2315c0..00f81b4 100644 | |||
255 | if (r == -ELOOP) | 257 | if (r == -ELOOP) |
256 | return -EINVAL; | 258 | return -EINVAL; |
257 | diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c | 259 | diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c |
258 | index 2cebcce..7111fc1 100644 | 260 | index 30b9a66334..cc1d577933 100644 |
259 | --- a/src/login/logind-dbus.c | 261 | --- a/src/login/logind-dbus.c |
260 | +++ b/src/login/logind-dbus.c | 262 | +++ b/src/login/logind-dbus.c |
261 | @@ -1285,7 +1285,7 @@ static int trigger_device(Manager *m, sd_device *d) { | 263 | @@ -1325,7 +1325,7 @@ static int trigger_device(Manager *m, sd_device *d) { |
262 | if (!t) | 264 | if (!t) |
263 | return -ENOMEM; | 265 | return -ENOMEM; |
264 | 266 | ||
@@ -268,23 +270,23 @@ index 2cebcce..7111fc1 100644 | |||
268 | 270 | ||
269 | return 0; | 271 | return 0; |
270 | diff --git a/src/nspawn/nspawn-cgroup.c b/src/nspawn/nspawn-cgroup.c | 272 | diff --git a/src/nspawn/nspawn-cgroup.c b/src/nspawn/nspawn-cgroup.c |
271 | index 168125d..dd0ab79 100644 | 273 | index 0462b46413..7c53d41483 100644 |
272 | --- a/src/nspawn/nspawn-cgroup.c | 274 | --- a/src/nspawn/nspawn-cgroup.c |
273 | +++ b/src/nspawn/nspawn-cgroup.c | 275 | +++ b/src/nspawn/nspawn-cgroup.c |
274 | @@ -124,7 +124,7 @@ int sync_cgroup(pid_t pid, CGroupUnified unified_requested, uid_t uid_shift) { | 276 | @@ -123,7 +123,7 @@ int sync_cgroup(pid_t pid, CGroupUnified unified_requested, uid_t uid_shift) { |
275 | (void) mkdir_parents(fn, 0755); | 277 | fn = strjoina(tree, cgroup, "/cgroup.procs"); |
276 | 278 | ||
277 | sprintf(pid_string, PID_FMT, pid); | 279 | sprintf(pid_string, PID_FMT, pid); |
278 | - r = write_string_file(fn, pid_string, WRITE_STRING_FILE_DISABLE_BUFFER); | 280 | - r = write_string_file(fn, pid_string, WRITE_STRING_FILE_DISABLE_BUFFER|WRITE_STRING_FILE_MKDIR_0755); |
279 | + r = write_string_file(fn, pid_string, 0); | 281 | + r = write_string_file(fn, pid_string, WRITE_STRING_FILE_MKDIR_0755); |
280 | if (r < 0) { | 282 | if (r < 0) { |
281 | log_error_errno(r, "Failed to move process: %m"); | 283 | log_error_errno(r, "Failed to move process: %m"); |
282 | goto finish; | 284 | goto finish; |
283 | diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c | 285 | diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c |
284 | index 3b0ecb1..a1b5240 100644 | 286 | index 2aec8041f0..841542f2f3 100644 |
285 | --- a/src/nspawn/nspawn.c | 287 | --- a/src/nspawn/nspawn.c |
286 | +++ b/src/nspawn/nspawn.c | 288 | +++ b/src/nspawn/nspawn.c |
287 | @@ -2341,7 +2341,7 @@ static int reset_audit_loginuid(void) { | 289 | @@ -2357,7 +2357,7 @@ static int reset_audit_loginuid(void) { |
288 | if (streq(p, "4294967295")) | 290 | if (streq(p, "4294967295")) |
289 | return 0; | 291 | return 0; |
290 | 292 | ||
@@ -293,7 +295,7 @@ index 3b0ecb1..a1b5240 100644 | |||
293 | if (r < 0) { | 295 | if (r < 0) { |
294 | log_error_errno(r, | 296 | log_error_errno(r, |
295 | "Failed to reset audit login UID. This probably means that your kernel is too\n" | 297 | "Failed to reset audit login UID. This probably means that your kernel is too\n" |
296 | @@ -3531,13 +3531,13 @@ static int setup_uid_map(pid_t pid) { | 298 | @@ -3566,13 +3566,13 @@ static int setup_uid_map(pid_t pid) { |
297 | 299 | ||
298 | xsprintf(uid_map, "/proc/" PID_FMT "/uid_map", pid); | 300 | xsprintf(uid_map, "/proc/" PID_FMT "/uid_map", pid); |
299 | xsprintf(line, UID_FMT " " UID_FMT " " UID_FMT "\n", 0, arg_uid_shift, arg_uid_range); | 301 | xsprintf(line, UID_FMT " " UID_FMT " " UID_FMT "\n", 0, arg_uid_shift, arg_uid_range); |
@@ -310,10 +312,10 @@ index 3b0ecb1..a1b5240 100644 | |||
310 | return log_error_errno(r, "Failed to write GID map: %m"); | 312 | return log_error_errno(r, "Failed to write GID map: %m"); |
311 | 313 | ||
312 | diff --git a/src/shared/sysctl-util.c b/src/shared/sysctl-util.c | 314 | diff --git a/src/shared/sysctl-util.c b/src/shared/sysctl-util.c |
313 | index 9be4055..f935cde 100644 | 315 | index 93bdcf11bf..68cddb7a9f 100644 |
314 | --- a/src/shared/sysctl-util.c | 316 | --- a/src/shared/sysctl-util.c |
315 | +++ b/src/shared/sysctl-util.c | 317 | +++ b/src/shared/sysctl-util.c |
316 | @@ -73,7 +73,7 @@ int sysctl_write_ip_property(int af, const char *ifname, const char *property, c | 318 | @@ -88,7 +88,7 @@ int sysctl_write_ip_property(int af, const char *ifname, const char *property, c |
317 | 319 | ||
318 | log_debug("Setting '%s' to '%s'", p, value); | 320 | log_debug("Setting '%s' to '%s'", p, value); |
319 | 321 | ||
@@ -323,19 +325,19 @@ index 9be4055..f935cde 100644 | |||
323 | 325 | ||
324 | int sysctl_read(const char *property, char **content) { | 326 | int sysctl_read(const char *property, char **content) { |
325 | diff --git a/src/sleep/sleep.c b/src/sleep/sleep.c | 327 | diff --git a/src/sleep/sleep.c b/src/sleep/sleep.c |
326 | index 11aabaf..6aa5d37 100644 | 328 | index b9fe96635d..f168d7f890 100644 |
327 | --- a/src/sleep/sleep.c | 329 | --- a/src/sleep/sleep.c |
328 | +++ b/src/sleep/sleep.c | 330 | +++ b/src/sleep/sleep.c |
329 | @@ -48,7 +48,7 @@ static int write_hibernate_location_info(void) { | 331 | @@ -54,7 +54,7 @@ static int write_hibernate_location_info(void) { |
330 | 332 | ||
331 | /* if it's a swap partition, we just write the disk to /sys/power/resume */ | 333 | /* if it's a swap partition, we just write the disk to /sys/power/resume */ |
332 | if (streq(type, "partition")) { | 334 | if (streq(type, "partition")) { |
333 | - r = write_string_file("/sys/power/resume", device, WRITE_STRING_FILE_DISABLE_BUFFER); | 335 | - r = write_string_file("/sys/power/resume", device, WRITE_STRING_FILE_DISABLE_BUFFER); |
334 | + r = write_string_file("/sys/power/resume", device, 0); | 336 | + r = write_string_file("/sys/power/resume", device, 0); |
335 | if (r < 0) | 337 | if (r < 0) |
336 | return log_debug_errno(r, "Faileed to write partitoin device to /sys/power/resume: %m"); | 338 | return log_debug_errno(r, "Failed to write partition device to /sys/power/resume: %m"); |
337 | 339 | ||
338 | @@ -84,12 +84,12 @@ static int write_hibernate_location_info(void) { | 340 | @@ -98,14 +98,14 @@ static int write_hibernate_location_info(void) { |
339 | 341 | ||
340 | offset = fiemap->fm_extents[0].fe_physical / page_size(); | 342 | offset = fiemap->fm_extents[0].fe_physical / page_size(); |
341 | xsprintf(offset_str, "%" PRIu64, offset); | 343 | xsprintf(offset_str, "%" PRIu64, offset); |
@@ -344,13 +346,15 @@ index 11aabaf..6aa5d37 100644 | |||
344 | if (r < 0) | 346 | if (r < 0) |
345 | return log_debug_errno(r, "Failed to write offset '%s': %m", offset_str); | 347 | return log_debug_errno(r, "Failed to write offset '%s': %m", offset_str); |
346 | 348 | ||
349 | log_debug("Wrote calculated resume_offset value to /sys/power/resume_offset: %s", offset_str); | ||
350 | |||
347 | xsprintf(device_str, "%lx", (unsigned long)stb.st_dev); | 351 | xsprintf(device_str, "%lx", (unsigned long)stb.st_dev); |
348 | - r = write_string_file("/sys/power/resume", device_str, WRITE_STRING_FILE_DISABLE_BUFFER); | 352 | - r = write_string_file("/sys/power/resume", device_str, WRITE_STRING_FILE_DISABLE_BUFFER); |
349 | + r = write_string_file("/sys/power/resume", device_str, 0); | 353 | + r = write_string_file("/sys/power/resume", device_str, 0); |
350 | if (r < 0) | 354 | if (r < 0) |
351 | return log_debug_errno(r, "Failed to write device '%s': %m", device_str); | 355 | return log_debug_errno(r, "Failed to write device '%s': %m", device_str); |
352 | 356 | ||
353 | @@ -103,7 +103,7 @@ static int write_mode(char **modes) { | 357 | @@ -121,7 +121,7 @@ static int write_mode(char **modes) { |
354 | STRV_FOREACH(mode, modes) { | 358 | STRV_FOREACH(mode, modes) { |
355 | int k; | 359 | int k; |
356 | 360 | ||
@@ -359,7 +363,7 @@ index 11aabaf..6aa5d37 100644 | |||
359 | if (k >= 0) | 363 | if (k >= 0) |
360 | return 0; | 364 | return 0; |
361 | 365 | ||
362 | @@ -122,7 +122,7 @@ static int write_state(FILE **f, char **states) { | 366 | @@ -140,7 +140,7 @@ static int write_state(FILE **f, char **states) { |
363 | STRV_FOREACH(state, states) { | 367 | STRV_FOREACH(state, states) { |
364 | int k; | 368 | int k; |
365 | 369 | ||
@@ -368,17 +372,8 @@ index 11aabaf..6aa5d37 100644 | |||
368 | if (k >= 0) | 372 | if (k >= 0) |
369 | return 0; | 373 | return 0; |
370 | log_debug_errno(k, "Failed to write '%s' to /sys/power/state: %m", *state); | 374 | log_debug_errno(k, "Failed to write '%s' to /sys/power/state: %m", *state); |
371 | @@ -217,7 +217,7 @@ static int rtc_write_wake_alarm(uint64_t sec) { | ||
372 | |||
373 | xsprintf(buf, "%" PRIu64, sec); | ||
374 | |||
375 | - r = write_string_file("/sys/class/rtc/rtc0/wakealarm", buf, WRITE_STRING_FILE_DISABLE_BUFFER); | ||
376 | + r = write_string_file("/sys/class/rtc/rtc0/wakealarm", buf, 0); | ||
377 | if (r < 0) | ||
378 | return log_error_errno(r, "Failed to write '%s' to /sys/class/rtc/rtc0/wakealarm: %m", buf); | ||
379 | |||
380 | diff --git a/src/udev/udevadm-trigger.c b/src/udev/udevadm-trigger.c | 375 | diff --git a/src/udev/udevadm-trigger.c b/src/udev/udevadm-trigger.c |
381 | index b7dafb7..bab4907 100644 | 376 | index 77d95e513f..25ce4abfb1 100644 |
382 | --- a/src/udev/udevadm-trigger.c | 377 | --- a/src/udev/udevadm-trigger.c |
383 | +++ b/src/udev/udevadm-trigger.c | 378 | +++ b/src/udev/udevadm-trigger.c |
384 | @@ -43,7 +43,7 @@ static int exec_list(sd_device_enumerator *e, const char *action, Set *settle_se | 379 | @@ -43,7 +43,7 @@ static int exec_list(sd_device_enumerator *e, const char *action, Set *settle_se |
@@ -388,44 +383,26 @@ index b7dafb7..bab4907 100644 | |||
388 | - r = write_string_file(filename, action, WRITE_STRING_FILE_DISABLE_BUFFER); | 383 | - r = write_string_file(filename, action, WRITE_STRING_FILE_DISABLE_BUFFER); |
389 | + r = write_string_file(filename, action, 0); | 384 | + r = write_string_file(filename, action, 0); |
390 | if (r < 0) { | 385 | if (r < 0) { |
391 | log_debug_errno(r, "Failed to write '%s' to '%s', ignoring: %m", action, filename); | 386 | log_full_errno(r == -ENOENT ? LOG_DEBUG : LOG_ERR, r, |
392 | continue; | 387 | "Failed to write '%s' to '%s': %m", action, filename); |
393 | diff --git a/src/udev/udevd.c b/src/udev/udevd.c | 388 | diff --git a/src/udev/udevd.c b/src/udev/udevd.c |
394 | index 140ec35..33063a9 100644 | 389 | index cb5123042a..ea309a9e7f 100644 |
395 | --- a/src/udev/udevd.c | 390 | --- a/src/udev/udevd.c |
396 | +++ b/src/udev/udevd.c | 391 | +++ b/src/udev/udevd.c |
397 | @@ -1185,7 +1185,7 @@ static int synthesize_change(sd_device *dev) { | 392 | @@ -1113,7 +1113,7 @@ static int synthesize_change_one(sd_device *dev, const char *syspath) { |
398 | */ | ||
399 | log_debug("Device '%s' is closed, synthesising 'change'", devname); | ||
400 | strscpyl(filename, sizeof(filename), syspath, "/uevent", NULL); | ||
401 | - write_string_file(filename, "change", WRITE_STRING_FILE_DISABLE_BUFFER); | ||
402 | + write_string_file(filename, "change", 0); | ||
403 | |||
404 | FOREACH_DEVICE(e, d) { | ||
405 | const char *t, *n, *s; | ||
406 | @@ -1200,7 +1200,7 @@ static int synthesize_change(sd_device *dev) { | ||
407 | |||
408 | log_debug("Device '%s' is closed, synthesising partition '%s' 'change'", devname, n); | ||
409 | strscpyl(filename, sizeof(filename), s, "/uevent", NULL); | ||
410 | - write_string_file(filename, "change", WRITE_STRING_FILE_DISABLE_BUFFER); | ||
411 | + write_string_file(filename, "change", 0); | ||
412 | } | ||
413 | |||
414 | return 0; | ||
415 | @@ -1208,7 +1208,7 @@ static int synthesize_change(sd_device *dev) { | ||
416 | |||
417 | log_debug("Device %s is closed, synthesising 'change'", devname); | ||
418 | strscpyl(filename, sizeof(filename), syspath, "/uevent", NULL); | ||
419 | - write_string_file(filename, "change", WRITE_STRING_FILE_DISABLE_BUFFER); | ||
420 | + write_string_file(filename, "change", 0); | ||
421 | 393 | ||
394 | filename = strjoina(syspath, "/uevent"); | ||
395 | log_device_debug(dev, "device is closed, synthesising 'change' on %s", syspath); | ||
396 | - r = write_string_file(filename, "change", WRITE_STRING_FILE_DISABLE_BUFFER); | ||
397 | + r = write_string_file(filename, "change", 0); | ||
398 | if (r < 0) | ||
399 | return log_device_debug_errno(dev, r, "Failed to write 'change' to %s: %m", filename); | ||
422 | return 0; | 400 | return 0; |
423 | } | ||
424 | diff --git a/src/vconsole/vconsole-setup.c b/src/vconsole/vconsole-setup.c | 401 | diff --git a/src/vconsole/vconsole-setup.c b/src/vconsole/vconsole-setup.c |
425 | index 67dc2e4..01b83d0 100644 | 402 | index 75d052ae70..5a15c939d8 100644 |
426 | --- a/src/vconsole/vconsole-setup.c | 403 | --- a/src/vconsole/vconsole-setup.c |
427 | +++ b/src/vconsole/vconsole-setup.c | 404 | +++ b/src/vconsole/vconsole-setup.c |
428 | @@ -116,7 +116,7 @@ static int toggle_utf8(const char *name, int fd, bool utf8) { | 405 | @@ -117,7 +117,7 @@ static int toggle_utf8_vc(const char *name, int fd, bool utf8) { |
429 | static int toggle_utf8_sysfs(bool utf8) { | 406 | static int toggle_utf8_sysfs(bool utf8) { |
430 | int r; | 407 | int r; |
431 | 408 | ||
@@ -434,6 +411,3 @@ index 67dc2e4..01b83d0 100644 | |||
434 | if (r < 0) | 411 | if (r < 0) |
435 | return log_warning_errno(r, "Failed to %s sysfs UTF-8 flag: %m", enable_disable(utf8)); | 412 | return log_warning_errno(r, "Failed to %s sysfs UTF-8 flag: %m", enable_disable(utf8)); |
436 | 413 | ||
437 | -- | ||
438 | 2.11.0 | ||
439 | |||