diff options
author | Daan De Meyer <daan.j.demeyer@gmail.com> | 2022-10-04 13:35:36 +0200 |
---|---|---|
committer | Luca Boccassi <luca.boccassi@gmail.com> | 2022-10-04 22:48:06 +0200 |
commit | fd1ca01a8613ed8a5a90e676f4f7eaafc6485575 (patch) | |
tree | 8c7aa4476d35c56d78dac9e37ff4deea4660d665 /src/partition | |
parent | NEWS: even more news (diff) | |
download | systemd-fd1ca01a8613ed8a5a90e676f4f7eaafc6485575.tar.xz systemd-fd1ca01a8613ed8a5a90e676f4f7eaafc6485575.zip |
repart: Drop usage of CHASE_WARN
CHASE_WARN only makes sense when CHASE_SAFE or CHASE_NO_AUTOFS are
used. repart uses neither so let's drop usage of CHASE_WARN.
Diffstat (limited to 'src/partition')
-rw-r--r-- | src/partition/repart.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/partition/repart.c b/src/partition/repart.c index 29c9b57939..92aa9a25eb 100644 --- a/src/partition/repart.c +++ b/src/partition/repart.c @@ -3232,7 +3232,7 @@ static int do_copy_files(Partition *p, const char *root) { STRV_FOREACH_PAIR(source, target, p->copy_files) { _cleanup_close_ int sfd = -1, pfd = -1, tfd = -1; - sfd = chase_symlinks_and_open(*source, arg_root, CHASE_PREFIX_ROOT|CHASE_WARN, O_CLOEXEC|O_NOCTTY, NULL); + sfd = chase_symlinks_and_open(*source, arg_root, CHASE_PREFIX_ROOT, O_CLOEXEC|O_NOCTTY, NULL); if (sfd < 0) return log_error_errno(sfd, "Failed to open source file '%s%s': %m", strempty(arg_root), *source); @@ -3242,7 +3242,7 @@ static int do_copy_files(Partition *p, const char *root) { return log_error_errno(r, "Failed to check type of source file '%s': %m", *source); /* We are looking at a directory */ - tfd = chase_symlinks_and_open(*target, root, CHASE_PREFIX_ROOT|CHASE_WARN, O_RDONLY|O_DIRECTORY|O_CLOEXEC, NULL); + tfd = chase_symlinks_and_open(*target, root, CHASE_PREFIX_ROOT, O_RDONLY|O_DIRECTORY|O_CLOEXEC, NULL); if (tfd < 0) { _cleanup_free_ char *dn = NULL, *fn = NULL; @@ -3261,7 +3261,7 @@ static int do_copy_files(Partition *p, const char *root) { if (r < 0) return log_error_errno(r, "Failed to create parent directory '%s': %m", dn); - pfd = chase_symlinks_and_open(dn, root, CHASE_PREFIX_ROOT|CHASE_WARN, O_RDONLY|O_DIRECTORY|O_CLOEXEC, NULL); + pfd = chase_symlinks_and_open(dn, root, CHASE_PREFIX_ROOT, O_RDONLY|O_DIRECTORY|O_CLOEXEC, NULL); if (pfd < 0) return log_error_errno(pfd, "Failed to open parent directory of target: %m"); @@ -3298,7 +3298,7 @@ static int do_copy_files(Partition *p, const char *root) { if (r < 0) return log_error_errno(r, "Failed to create parent directory: %m"); - pfd = chase_symlinks_and_open(dn, root, CHASE_PREFIX_ROOT|CHASE_WARN, O_RDONLY|O_DIRECTORY|O_CLOEXEC, NULL); + pfd = chase_symlinks_and_open(dn, root, CHASE_PREFIX_ROOT, O_RDONLY|O_DIRECTORY|O_CLOEXEC, NULL); if (pfd < 0) return log_error_errno(pfd, "Failed to open parent directory of target: %m"); @@ -3361,7 +3361,7 @@ static int partition_populate_directory(Partition *p, char **ret_root, char **re if (strv_length(p->copy_files) == 2 && strv_length(p->make_directories) == 0 && streq(p->copy_files[1], "/")) { _cleanup_free_ char *s = NULL; - r = chase_symlinks(p->copy_files[0], arg_root, CHASE_PREFIX_ROOT|CHASE_WARN, &s, NULL); + r = chase_symlinks(p->copy_files[0], arg_root, CHASE_PREFIX_ROOT, &s, NULL); if (r < 0) return log_error_errno(r, "Failed to resolve source '%s%s': %m", strempty(arg_root), p->copy_files[0]); |