From: Lars Weber <weber@weber-software.com>
Date: Thu, 13 Jan 2022 13:28:45 +0000 (+0100)
Subject: squashfs: show an error message if the inode_table can't be, allocated
X-Git-Tag: v2025.01-rc5-pxa1908~1560^2
X-Git-Url: http://git.dujemihanovic.xyz/%22mailto:Murray.Jensen%40csiro.au/static/%7B%7B?a=commitdiff_plain;h=1e69db57e64249f7f7a5a282a3a2f1b053be3f6f;p=u-boot.git

squashfs: show an error message if the inode_table can't be, allocated

Signed-off-by: Lars Weber <weber@weber-software.com>
---

diff --git a/fs/squashfs/sqfs.c b/fs/squashfs/sqfs.c
index e2d91c654c..5d9c52af80 100644
--- a/fs/squashfs/sqfs.c
+++ b/fs/squashfs/sqfs.c
@@ -728,6 +728,8 @@ static int sqfs_read_inode_table(unsigned char **inode_table)
 	*inode_table = malloc(metablks_count * SQFS_METADATA_BLOCK_SIZE);
 	if (!*inode_table) {
 		ret = -ENOMEM;
+		printf("Error: failed to allocate squashfs inode_table of size %i, increasing CONFIG_SYS_MALLOC_LEN could help\n",
+		       metablks_count * SQFS_METADATA_BLOCK_SIZE);
 		goto free_itb;
 	}