Message ID | 20200319151036.11723-1-marcos@mpdesouza.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | btrfs-progs: restore: Avoid SYMLINK messages | expand |
On Thu, Mar 19, 2020 at 12:10:36PM -0300, Marcos Paulo de Souza wrote: > From: Marcos Paulo de Souza <mpdesouza@suse.com> > > Some scripts can still rely in this message, so make it available only > if --verbose was informed. > > Fixes: #127 > > Signed-off-by: Marcos Paulo de Souza <mpdesouza@suse.com> > --- > cmds/restore.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/cmds/restore.c b/cmds/restore.c > index 8eaafd60..73a464c3 100644 > --- a/cmds/restore.c > +++ b/cmds/restore.c > @@ -898,7 +898,9 @@ static int copy_symlink(struct btrfs_root *root, struct btrfs_key *key, > goto out; > } > } > - printf("SYMLINK: '%s' => '%s'\n", path_name, symlink_target); > + > + if (verbose) I've changed it to verbose >= 2, ie. it's printed with -vv. Patch added to devel, thanks.
diff --git a/cmds/restore.c b/cmds/restore.c index 8eaafd60..73a464c3 100644 --- a/cmds/restore.c +++ b/cmds/restore.c @@ -898,7 +898,9 @@ static int copy_symlink(struct btrfs_root *root, struct btrfs_key *key, goto out; } } - printf("SYMLINK: '%s' => '%s'\n", path_name, symlink_target); + + if (verbose) + printf("SYMLINK: '%s' => '%s'\n", path_name, symlink_target); ret = 0; if (!restore_metadata)