]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
copy: add one more assertions about copy_flags
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 22 Jun 2023 07:12:24 +0000 (16:12 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 23 Jun 2023 01:07:38 +0000 (10:07 +0900)
Follow-up for 01428141ba42a06d22f2c0e0df26049e700f4098.

src/shared/copy.c

index db26945be8e0513db357980b7af6c32bbef652af..5a4a8aaf0d5c0ff89347573aa04ecfd403aa7022 100644 (file)
@@ -1133,8 +1133,11 @@ static int fd_copy_tree_generic(
                 copy_progress_path_t progress_path,
                 copy_progress_bytes_t progress_bytes,
                 void *userdata) {
+
         int r;
 
+        assert(!FLAGS_SET(copy_flags, COPY_LOCK_BSD));
+
         if (S_ISDIR(st->st_mode))
                 return fd_copy_directory(df, from, st, dt, to, original_device, depth_left-1, override_uid,
                                          override_gid, copy_flags, denylist, hardlink_context, display_path,