mirror of
https://github.com/systemd/systemd.git
synced 2024-11-02 10:51:20 +03:00
kdbus: when running in a container, don't complain that we cannot write to /sys
This commit is contained in:
parent
bf371116f6
commit
1214b53c8e
@ -1810,10 +1810,8 @@ int bus_kernel_fix_attach_mask(void) {
|
|||||||
* line option, however. */
|
* line option, however. */
|
||||||
|
|
||||||
r = get_proc_cmdline_key("systemd.kdbus_attach_flags_mask=", &mask);
|
r = get_proc_cmdline_key("systemd.kdbus_attach_flags_mask=", &mask);
|
||||||
if (r < 0) {
|
if (r < 0)
|
||||||
log_warning_errno(-r, "Failed to read kernel command line: %m");
|
return log_warning_errno(r, "Failed to read kernel command line: %m");
|
||||||
return r;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (mask) {
|
if (mask) {
|
||||||
const char *p = mask;
|
const char *p = mask;
|
||||||
@ -1827,10 +1825,10 @@ int bus_kernel_fix_attach_mask(void) {
|
|||||||
|
|
||||||
sprintf(buf, "0x%" PRIx64 "\n", m);
|
sprintf(buf, "0x%" PRIx64 "\n", m);
|
||||||
r = write_string_file("/sys/module/kdbus/parameters/attach_flags_mask", buf);
|
r = write_string_file("/sys/module/kdbus/parameters/attach_flags_mask", buf);
|
||||||
if (r < 0) {
|
if (r < 0)
|
||||||
log_warning_errno(-r, "Failed to write kdbus attach mask: %m");
|
return log_full_errno(
|
||||||
return r;
|
r == -EROFS ? LOG_DEBUG : LOG_WARNING, r,
|
||||||
}
|
"Failed to write kdbus attach mask: %m");
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user