read_fs: We should print ERROR message if compression options reading fails
Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
diff --git a/squashfs-tools/read_fs.c b/squashfs-tools/read_fs.c
index f2495d1..b16b6eb 100644
--- a/squashfs-tools/read_fs.c
+++ b/squashfs-tools/read_fs.c
@@ -552,8 +552,11 @@
if(SQUASHFS_COMP_OPTS(sBlk->flags)) {
bytes = read_block(fd, sizeof(*sBlk), NULL, 0, buffer);
- if(bytes == 0)
+ if(bytes == 0) {
+ ERROR("Failed to read compressor options from append"
+ "filesystem\n");
goto failed_mount;
+ }
}
res = compressor_extract_options(comp, sBlk->block_size, buffer, bytes);