[PATCH v2 27/28] fs/squashfs: sqfs_read: fragmented files are not supported

Richard Genoud richard.genoud at posteo.net
Tue Nov 3 12:11:25 CET 2020


The code for reading a fragmented file is not functionnal.
It's better to signal this to the user.

Signed-off-by: Richard Genoud <richard.genoud at posteo.net>
---
 fs/squashfs/sqfs.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/fs/squashfs/sqfs.c b/fs/squashfs/sqfs.c
index f63a06fd40f..a96c1d4f564 100644
--- a/fs/squashfs/sqfs.c
+++ b/fs/squashfs/sqfs.c
@@ -1498,6 +1498,13 @@ int sqfs_read(const char *filename, void *buf, loff_t offset, loff_t len,
 		goto out;
 	}
 
+	printf("Error: reading a fragmented file is not supported yet.\n");
+	ret = -EINVAL;
+	goto out;
+
+	/*
+	 * TODO: reading a fragmented file doesn't work
+	 */
 	start = frag_entry.start / ctxt.cur_dev->blksz;
 	table_size = SQFS_BLOCK_SIZE(frag_entry.size);
 	table_offset = frag_entry.start - (start * ctxt.cur_dev->blksz);


More information about the U-Boot mailing list