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:
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user