All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] btrfs-progs: restore: Avoid SYMLINK messages
@ 2020-03-19 15:10 Marcos Paulo de Souza
  2020-03-26 17:25 ` David Sterba
  0 siblings, 1 reply; 2+ messages in thread
From: Marcos Paulo de Souza @ 2020-03-19 15:10 UTC (permalink / raw)
  To: dsterba, linux-btrfs; +Cc: Marcos Paulo de Souza

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)
+		printf("SYMLINK: '%s' => '%s'\n", path_name, symlink_target);
 
 	ret = 0;
 	if (!restore_metadata)
-- 
2.25.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] btrfs-progs: restore: Avoid SYMLINK messages
  2020-03-19 15:10 [PATCH] btrfs-progs: restore: Avoid SYMLINK messages Marcos Paulo de Souza
@ 2020-03-26 17:25 ` David Sterba
  0 siblings, 0 replies; 2+ messages in thread
From: David Sterba @ 2020-03-26 17:25 UTC (permalink / raw)
  To: Marcos Paulo de Souza; +Cc: dsterba, linux-btrfs, Marcos Paulo de Souza

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-03-26 17:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-19 15:10 [PATCH] btrfs-progs: restore: Avoid SYMLINK messages Marcos Paulo de Souza
2020-03-26 17:25 ` David Sterba

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.