Unverified Commit 5f666a8f by Christian Brauner Committed by GitHub

Merge pull request #2767 from Blub/2019-01-04/use-syserror-on-write-error

conf: use SYSERROR on lxc_write_to_file errors
parents dfaaf1cf 688e8982
...@@ -2681,8 +2681,8 @@ int setup_sysctl_parameters(struct lxc_list *sysctls) ...@@ -2681,8 +2681,8 @@ int setup_sysctl_parameters(struct lxc_list *sysctls)
ret = lxc_write_to_file(filename, elem->value, ret = lxc_write_to_file(filename, elem->value,
strlen(elem->value), false, 0666); strlen(elem->value), false, 0666);
if (ret < 0) { if (ret < 0) {
ERROR("Failed to setup sysctl parameters %s to %s", SYSERROR("Failed to setup sysctl parameters %s to %s",
elem->key, elem->value); elem->key, elem->value);
return -1; return -1;
} }
} }
...@@ -2716,8 +2716,8 @@ int setup_proc_filesystem(struct lxc_list *procs, pid_t pid) ...@@ -2716,8 +2716,8 @@ int setup_proc_filesystem(struct lxc_list *procs, pid_t pid)
ret = lxc_write_to_file(filename, elem->value, ret = lxc_write_to_file(filename, elem->value,
strlen(elem->value), false, 0666); strlen(elem->value), false, 0666);
if (ret < 0) { if (ret < 0) {
ERROR("Failed to setup proc filesystem %s to %s", SYSERROR("Failed to setup proc filesystem %s to %s",
elem->filename, elem->value); elem->filename, elem->value);
return -1; return -1;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment