Skip to content

Commit

Permalink
btrfs-progs: receive: make option quiet work for chroot
Browse files Browse the repository at this point in the history
With --chroot, the receive subcommand unconditionally sent a non-error
status message to stderr, e.g.:

$ btrfs --quiet receive --chroot /some/path
Chroot to /some/path

Signed-off-by: Sebastian Hamann <[email protected]>
  • Loading branch information
s-hamann authored and adam900710 committed Oct 10, 2024
1 parent c2c922f commit 5d2ef32
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmds/receive.c
Original file line number Diff line number Diff line change
Expand Up @@ -1555,7 +1555,8 @@ static int do_receive(struct btrfs_receive *rctx, const char *tomnt,
error("failed to chdir to / after chroot: %m");
goto out;
}
fprintf(stderr, "Chroot to %s\n", dest_dir_full_path);
if (bconf.verbose > BTRFS_BCONF_QUIET)
fprintf(stderr, "Chroot to %s\n", dest_dir_full_path);
rctx->root_path = strdup("/");
rctx->dest_dir_path = rctx->root_path;
} else {
Expand Down

0 comments on commit 5d2ef32

Please sign in to comment.