diff options
author | Daan De Meyer <daan.j.demeyer@gmail.com> | 2023-03-14 16:30:46 +0100 |
---|---|---|
committer | Daan De Meyer <daan.j.demeyer@gmail.com> | 2023-03-21 20:53:09 +0100 |
commit | 7c2f5495e27283c757a5eb544af7654c8f60e50d (patch) | |
tree | fec5aac5976b64120c3b27600089d0247328cc40 /src/nspawn | |
parent | f3e03bd04e21c00cd251bf69a346d0ae505b6494 (diff) | |
download | systemd-7c2f5495e27283c757a5eb544af7654c8f60e50d.tar.gz |
copy: Move chattr arguments to full function signatures
These are almost never used, so let's move them to the _full()
functions signatures.
Diffstat (limited to 'src/nspawn')
-rw-r--r-- | src/nspawn/nspawn.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c index 7122902aa0..056fad005d 100644 --- a/src/nspawn/nspawn.c +++ b/src/nspawn/nspawn.c @@ -2034,7 +2034,7 @@ static int setup_timezone(const char *dest) { case TIMEZONE_COPY: /* If mounting failed, try to copy */ - r = copy_file_atomic("/etc/localtime", where, 0644, 0, 0, COPY_REFLINK|COPY_REPLACE); + r = copy_file_atomic("/etc/localtime", where, 0644, COPY_REFLINK|COPY_REPLACE); if (r < 0) { log_full_errno(IN_SET(r, -EROFS, -EACCES, -EPERM) ? LOG_DEBUG : LOG_WARNING, r, "Failed to copy /etc/localtime to %s, ignoring: %m", where); @@ -2168,9 +2168,9 @@ static int setup_resolv_conf(const char *dest) { } if (IN_SET(m, RESOLV_CONF_REPLACE_HOST, RESOLV_CONF_REPLACE_STATIC, RESOLV_CONF_REPLACE_UPLINK, RESOLV_CONF_REPLACE_STUB)) - r = copy_file_atomic(what, where, 0644, 0, 0, COPY_REFLINK|COPY_REPLACE); + r = copy_file_atomic(what, where, 0644, COPY_REFLINK|COPY_REPLACE); else - r = copy_file(what, where, O_TRUNC|O_NOFOLLOW, 0644, 0, 0, COPY_REFLINK); + r = copy_file(what, where, O_TRUNC|O_NOFOLLOW, 0644, COPY_REFLINK); if (r < 0) { /* If the file already exists as symlink, let's suppress the warning, under the assumption that * resolved or something similar runs inside and the symlink points there. @@ -5697,7 +5697,10 @@ static int run(int argc, char *argv[]) { { BLOCK_SIGNALS(SIGINT); - r = copy_file(arg_image, np, O_EXCL, arg_read_only ? 0400 : 0600, FS_NOCOW_FL, FS_NOCOW_FL, COPY_REFLINK|COPY_CRTIME|COPY_SIGINT); + r = copy_file_full(arg_image, np, O_EXCL, arg_read_only ? 0400 : 0600, + FS_NOCOW_FL, FS_NOCOW_FL, + COPY_REFLINK|COPY_CRTIME|COPY_SIGINT, + NULL, NULL); } if (r == -EINTR) { log_error_errno(r, "Interrupted while copying image file to %s, removed again.", np); |