copy: Make copy_xattr() more generic

Let's make copy_xattr() a little more generic in preparation for
copying symlink xattrs.
This commit is contained in:
Daan De Meyer
2023-02-14 12:51:40 +01:00
parent a4d2461c46
commit c17cfe6ef7
8 changed files with 16 additions and 16 deletions
+1 -1
View File
@@ -216,7 +216,7 @@ static int raw_export_process(RawExport *e) {
finish:
if (r >= 0) {
(void) copy_times(e->input_fd, e->output_fd, COPY_CRTIME);
(void) copy_xattr(e->input_fd, e->output_fd, 0);
(void) copy_xattr(e->input_fd, NULL, e->output_fd, NULL, 0);
}
if (e->on_finished)
+1 -1
View File
@@ -234,7 +234,7 @@ static int raw_import_finish(RawImport *i) {
if (S_ISREG(i->input_stat.st_mode)) {
(void) copy_times(i->input_fd, i->output_fd, COPY_CRTIME);
(void) copy_xattr(i->input_fd, i->output_fd, 0);
(void) copy_xattr(i->input_fd, NULL, i->output_fd, NULL, 0);
}
}
+1 -1
View File
@@ -396,7 +396,7 @@ static int raw_pull_make_local_copy(RawPull *i) {
return log_error_errno(r, "Failed to make writable copy of image: %m");
(void) copy_times(i->raw_job->disk_fd, dfd, COPY_CRTIME);
(void) copy_xattr(i->raw_job->disk_fd, dfd, 0);
(void) copy_xattr(i->raw_job->disk_fd, NULL, dfd, NULL, 0);
dfd = safe_close(dfd);