From mboxrd@z Thu Jan 1 00:00:00 1970 From: Richard Genoud Date: Tue, 3 Nov 2020 12:11:25 +0100 Subject: [PATCH v2 27/28] fs/squashfs: sqfs_read: fragmented files are not supported In-Reply-To: <20201103111126.23600-1-richard.genoud@posteo.net> References: <20201103111126.23600-1-richard.genoud@posteo.net> Message-ID: <20201103111126.23600-28-richard.genoud@posteo.net> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de The code for reading a fragmented file is not functionnal. It's better to signal this to the user. Signed-off-by: Richard Genoud --- 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);