tree-wide: move logging from varlink clients in nsresource.c/dissect-image.c into callers
These calls are "library-like", hence better should only debug log on their own, not more.
This commit is contained in:
@@ -365,7 +365,7 @@ int tar_export_start(
|
||||
_cleanup_close_ int mapped_fd = -EBADF;
|
||||
r = mountfsd_mount_directory_fd(directory_fd, e->userns_fd, DISSECT_IMAGE_FOREIGN_UID, &mapped_fd);
|
||||
if (r < 0)
|
||||
return r;
|
||||
return log_error_errno(r, "Failed to mount directory via mountfsd: %m");
|
||||
|
||||
/* Drop O_PATH */
|
||||
e->tree_fd = fd_reopen(mapped_fd, O_DIRECTORY|O_CLOEXEC);
|
||||
|
||||
@@ -259,11 +259,11 @@ static int tar_import_fork_tar(TarImport *i) {
|
||||
_cleanup_close_ int directory_fd = -EBADF;
|
||||
r = mountfsd_make_directory(d, MODE_INVALID, /* flags= */ 0, &directory_fd);
|
||||
if (r < 0)
|
||||
return r;
|
||||
return log_error_errno(r, "Failed to make directory via mountfsd: %m");
|
||||
|
||||
r = mountfsd_mount_directory_fd(directory_fd, i->userns_fd, DISSECT_IMAGE_FOREIGN_UID, &i->tree_fd);
|
||||
if (r < 0)
|
||||
return r;
|
||||
return log_error_errno(r, "Failed mount directory via mountfsd: %m");
|
||||
} else {
|
||||
if (i->flags & IMPORT_BTRFS_SUBVOL)
|
||||
r = btrfs_subvol_make_fallback(AT_FDCWD, d, 0755);
|
||||
|
||||
@@ -296,18 +296,18 @@ static int tar_pull_make_local_copy(TarPull *p) {
|
||||
|
||||
r = mountfsd_mount_directory_fd(directory_fd, p->userns_fd, DISSECT_IMAGE_FOREIGN_UID, &p->tree_fd);
|
||||
if (r < 0)
|
||||
return r;
|
||||
return log_error_errno(r, "Failed to mount directory via mountfsd: %m");
|
||||
}
|
||||
|
||||
_cleanup_close_ int directory_fd = -EBADF;
|
||||
r = mountfsd_make_directory(t, MODE_INVALID, /* flags= */ 0, &directory_fd);
|
||||
if (r < 0)
|
||||
return r;
|
||||
return log_error_errno(r, "Failed to make directory via mountfsd: %m");
|
||||
|
||||
_cleanup_close_ int copy_fd = -EBADF;
|
||||
r = mountfsd_mount_directory_fd(directory_fd, p->userns_fd, DISSECT_IMAGE_FOREIGN_UID, ©_fd);
|
||||
if (r < 0)
|
||||
return r;
|
||||
return log_error_errno(r, "Failed to mount directory via mountfsd: %m");
|
||||
|
||||
r = copy_tree_at_foreign(p->tree_fd, copy_fd, p->userns_fd);
|
||||
if (r < 0)
|
||||
@@ -614,11 +614,11 @@ static int tar_pull_job_on_open_disk_tar(PullJob *j) {
|
||||
_cleanup_close_ int directory_fd = -EBADF;
|
||||
r = mountfsd_make_directory(where, MODE_INVALID, /* flags= */ 0, &directory_fd);
|
||||
if (r < 0)
|
||||
return r;
|
||||
return log_error_errno(r, "Failed to make directory via mountfsd: %m");
|
||||
|
||||
r = mountfsd_mount_directory_fd(directory_fd, p->userns_fd, DISSECT_IMAGE_FOREIGN_UID, &p->tree_fd);
|
||||
if (r < 0)
|
||||
return r;
|
||||
return log_error_errno(r, "Failed to mount directory via mountfsd: %m");
|
||||
} else {
|
||||
if (p->flags & IMPORT_BTRFS_SUBVOL)
|
||||
r = btrfs_subvol_make_fallback(AT_FDCWD, where, 0755);
|
||||
|
||||
Reference in New Issue
Block a user