Skip to contentSkip to conversation

e2image: don't leak progress info to stdout

PATCH Applied Eric Sandeen 2 participants 2 messages Apr 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 e2image: don't leak progress info to stdout

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.

Addresses-Red-Hat-Bugzilla: #1327329

misc/e2image.c +1 -1
index e9b4ae2..690ad2c 100644
@@ -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) {