btrfs-progs: convert: don't print message when fs is not recognized, ext2

Bad magic error means it's not the desired filesystem so the error
message is just noise.

Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba 2017-08-29 19:42:10 +02:00
parent c9141313ec
commit 87adfe8254
1 changed files with 2 additions and 1 deletions

View File

@ -39,7 +39,8 @@ static int ext2_open_fs(struct btrfs_convert_context *cctx, const char *name)
ret = ext2fs_open(name, open_flag, 0, 0, unix_io_manager, &ext2_fs);
if (ret) {
fprintf(stderr, "ext2fs_open: %s\n", error_message(ret));
if (ret != EXT2_ET_BAD_MAGIC)
fprintf(stderr, "ext2fs_open: %s\n", error_message(ret));
return -1;
}
/*