linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] btrfs-progs: send-dump: add missing newlines
@ 2017-02-22 21:32 Benedikt Morbach
  2017-03-01 14:59 ` David Sterba
  0 siblings, 1 reply; 2+ messages in thread
From: Benedikt Morbach @ 2017-02-22 21:32 UTC (permalink / raw)
  To: linux-btrfs; +Cc: Benedikt Morbach

make sure to include newlines after commands that have only one
argument, such as 'unlink' or 'mkfile'

changes

    unlink          ./baz.0/file_autimes          ./baz.0/                        atime=2017-02-22T11:59:16+0100 mtime=2017-02-22T11:59:16+0100 ctime=2017-02-22T11:59:16+0100
    truncate        ./baz.0/file_a                  size=131072
    chmod           ./baz.0/file_a                  mode=644
    utimes          ./baz.0/file_a                  atime=2017-02-22T11:59:16+0100 mtime=2017-02-22T11:59:16+0100 ctime=2017-02-22T11:59:16+0100
    mkfile          ./baz.0/o258-11-0rename          ./baz.0/o258-11-0               dest=./baz.0/file_b
    utimes          ./baz.0/                        atime=2017-02-22T11:59:16+0100 mtime=2017-02-22T11:59:16+0100 ctime=2017-02-22T11:59:16+0100

to

    unlink          ./baz.0/file_a
    utimes          ./baz.0/                        atime=2017-02-22T11:59:16+0100 mtime=2017-02-22T11:59:16+0100 ctime=2017-02-22T11:59:16+0100
    truncate        ./baz.0/file_a                  size=131072
    chmod           ./baz.0/file_a                  mode=644
    utimes          ./baz.0/file_a                  atime=2017-02-22T11:59:16+0100 mtime=2017-02-22T11:59:16+0100 ctime=2017-02-22T11:59:16+0100
    mkfile          ./baz.0/o258-11-0
    rename          ./baz.0/o258-11-0               dest=./baz.0/file_b
    utimes          ./baz.0/                        atime=2017-02-22T11:59:16+0100 mtime=2017-02-22T11:59:16+0100 ctime=2017-02-22T11:59:16+0100

Signed-off-by: Benedikt Morbach <benedikt.morbach@googlemail.com>
---
 send-dump.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/send-dump.c b/send-dump.c
index 4c44246..67f7977 100644
--- a/send-dump.c
+++ b/send-dump.c
@@ -112,8 +112,10 @@ static int __print_dump(int subvol, void *user, const char *path,
 	/* Unified header */
 	printf("%-16s", title);
 	ret = print_path_escaped(out_path);
-	if (!fmt)
+	if (!fmt) {
+		putchar('\n');
 		return 0;
+	}
 	/* Short paths ale aligned to 32 chars */
 	while (ret++ < 32)
 		putchar(' ');
-- 
2.11.1


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

* Re: [PATCH] btrfs-progs: send-dump: add missing newlines
  2017-02-22 21:32 [PATCH] btrfs-progs: send-dump: add missing newlines Benedikt Morbach
@ 2017-03-01 14:59 ` David Sterba
  0 siblings, 0 replies; 2+ messages in thread
From: David Sterba @ 2017-03-01 14:59 UTC (permalink / raw)
  To: Benedikt Morbach; +Cc: linux-btrfs

On Wed, Feb 22, 2017 at 10:32:46PM +0100, Benedikt Morbach wrote:
> make sure to include newlines after commands that have only one
> argument, such as 'unlink' or 'mkfile'
> 
> changes
> 
>     unlink          ./baz.0/file_autimes          ./baz.0/                        atime=2017-02-22T11:59:16+0100 mtime=2017-02-22T11:59:16+0100 ctime=2017-02-22T11:59:16+0100
>     truncate        ./baz.0/file_a                  size=131072
>     chmod           ./baz.0/file_a                  mode=644
>     utimes          ./baz.0/file_a                  atime=2017-02-22T11:59:16+0100 mtime=2017-02-22T11:59:16+0100 ctime=2017-02-22T11:59:16+0100
>     mkfile          ./baz.0/o258-11-0rename          ./baz.0/o258-11-0               dest=./baz.0/file_b
>     utimes          ./baz.0/                        atime=2017-02-22T11:59:16+0100 mtime=2017-02-22T11:59:16+0100 ctime=2017-02-22T11:59:16+0100
> 
> to
> 
>     unlink          ./baz.0/file_a
>     utimes          ./baz.0/                        atime=2017-02-22T11:59:16+0100 mtime=2017-02-22T11:59:16+0100 ctime=2017-02-22T11:59:16+0100
>     truncate        ./baz.0/file_a                  size=131072
>     chmod           ./baz.0/file_a                  mode=644
>     utimes          ./baz.0/file_a                  atime=2017-02-22T11:59:16+0100 mtime=2017-02-22T11:59:16+0100 ctime=2017-02-22T11:59:16+0100
>     mkfile          ./baz.0/o258-11-0
>     rename          ./baz.0/o258-11-0               dest=./baz.0/file_b
>     utimes          ./baz.0/                        atime=2017-02-22T11:59:16+0100 mtime=2017-02-22T11:59:16+0100 ctime=2017-02-22T11:59:16+0100
> 
> Signed-off-by: Benedikt Morbach <benedikt.morbach@googlemail.com>

Applied, thanks.

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

end of thread, other threads:[~2017-03-01 16:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-22 21:32 [PATCH] btrfs-progs: send-dump: add missing newlines Benedikt Morbach
2017-03-01 14:59 ` David Sterba

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).