]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
repart: Use copy_bytes() instead of copy_bytes_full()
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Wed, 12 Oct 2022 18:01:37 +0000 (20:01 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 11 Nov 2022 12:47:47 +0000 (13:47 +0100)
src/partition/repart.c

index 46eda6bb081a9b47a85a3a1af1d651ce3758d9c5..94a87b978836110f637719d041d6b94ba536155b 100644 (file)
@@ -3200,7 +3200,7 @@ static int context_copy_blocks(Context *context) {
                 log_info("Copying in '%s' (%s) on block level into future partition %" PRIu64 ".",
                          p->copy_blocks_path, FORMAT_BYTES(p->copy_blocks_size), p->partno);
 
-                r = copy_bytes_full(p->copy_blocks_fd, target_fd, p->copy_blocks_size, 0, NULL, NULL, NULL, NULL);
+                r = copy_bytes(p->copy_blocks_fd, target_fd, p->copy_blocks_size, 0);
                 if (r < 0)
                         return log_error_errno(r, "Failed to copy in data from '%s': %m", p->copy_blocks_path);
 
@@ -4403,7 +4403,7 @@ static int context_split(Context *context) {
                 if (lseek(fd, p->offset, SEEK_SET) < 0)
                         return log_error_errno(errno, "Failed to seek to partition offset: %m");
 
-                r = copy_bytes_full(fd, fdt, p->new_size, COPY_REFLINK|COPY_HOLES, NULL, NULL, NULL, NULL);
+                r = copy_bytes(fd, fdt, p->new_size, COPY_REFLINK|COPY_HOLES);
                 if (r < 0)
                         return log_error_errno(r, "Failed to copy to split partition %s: %m", fname);
         }