* [PATCH] squashfs: show an error message if the inode_table can't be, allocated
@ 2022-01-13 13:28 Lars Weber
2022-01-29 12:50 ` Tom Rini
0 siblings, 1 reply; 2+ messages in thread
From: Lars Weber @ 2022-01-13 13:28 UTC (permalink / raw)
To: u-boot; +Cc: Lars Weber
Signed-off-by: Lars Weber <weber@weber-software.com>
---
fs/squashfs/sqfs.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/fs/squashfs/sqfs.c b/fs/squashfs/sqfs.c
index e2d91c654c..9a81e79622 100644
--- a/fs/squashfs/sqfs.c
+++ b/fs/squashfs/sqfs.c
@@ -728,6 +728,11 @@ 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;
}
--
2.30.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] squashfs: show an error message if the inode_table can't be, allocated
2022-01-13 13:28 [PATCH] squashfs: show an error message if the inode_table can't be, allocated Lars Weber
@ 2022-01-29 12:50 ` Tom Rini
0 siblings, 0 replies; 2+ messages in thread
From: Tom Rini @ 2022-01-29 12:50 UTC (permalink / raw)
To: Lars Weber; +Cc: u-boot
[-- Attachment #1: Type: text/plain, Size: 1079 bytes --]
On Thu, Jan 13, 2022 at 02:28:45PM +0100, Lars Weber wrote:
> Signed-off-by: Lars Weber <weber@weber-software.com>
> ---
> fs/squashfs/sqfs.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> }
>
> diff --git a/fs/squashfs/sqfs.c b/fs/squashfs/sqfs.c
> index e2d91c654c..9a81e79622 100644
> --- a/fs/squashfs/sqfs.c
> +++ b/fs/squashfs/sqfs.c
> @@ -728,6 +728,11 @@ 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;
After reworking to be a single print line (that is allowed to exceed 80
chars, to make grep easier), applied to u-boot/master, thanks!
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-01-29 12:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-13 13:28 [PATCH] squashfs: show an error message if the inode_table can't be, allocated Lars Weber
2022-01-29 12:50 ` Tom Rini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox