All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@redhat.com>
To: "linux-ext4@vger.kernel.org" <linux-ext4@vger.kernel.org>
Cc: Alex Markley <alex@malexmedia.net>
Subject: [PATCH] e2image: don't leak progress info to stdout
Date: Thu, 14 Apr 2016 22:20:46 -0500	[thread overview]
Message-ID: <57105E0E.1040006@redhat.com> (raw)

Commit c8ee0d60 fixed most of these, but missed this one.

# e2image -r -p <device> - > imagefile

leads to a corrupted image due to the "Scanning inodes..."
printf going to stdout.

Reported-by: Alex Markley <alex@malexmedia.net>
Addresses-Red-Hat-Bugzilla: #1327329
Signed-off-by: Eric Sandeen <sandeen@redhat.com>

diff --git a/misc/e2image.c b/misc/e2image.c
index e9b4ae2..690ad2c 100644
--- a/misc/e2image.c
+++ b/misc/e2image.c
@@ -1285,7 +1285,7 @@ static void write_raw_image_file(ext2_filsys fs, int fd, int type, int flags)
 
 	mark_table_blocks(fs);
 	if (show_progress)
-		printf("%s", _("Scanning inodes...\n"));
+		fprintf(stderr, "%s", _("Scanning inodes...\n"));
 
 	retval = ext2fs_open_inode_scan(fs, 0, &scan);
 	if (retval) {


             reply	other threads:[~2016-04-15  3:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-15  3:20 Eric Sandeen [this message]
2016-04-15 15:11 ` [PATCH] e2image: don't leak progress info to stdout Theodore Ts'o

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=57105E0E.1040006@redhat.com \
    --to=sandeen@redhat.com \
    --cc=alex@malexmedia.net \
    --cc=linux-ext4@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.