[PATCH 1/1] fs/squashfs: avoid superfluous messages
Heinrich Schuchardt
heinrich.schuchardt at canonical.com
Thu Sep 16 09:57:02 CEST 2021
Output like the following is quite irritating:
=> bootefi hello
Scanning disk mmc2.blk...
No valid Btrfs found
Bad magic number for SquashFS image.
** Unrecognized filesystem type **
Scanning disk mmc1.blk...
No valid Btrfs found
Bad magic number for SquashFS image.
** Unrecognized filesystem type **
Scanning disk mmc0.blk...
No valid Btrfs found
Bad magic number for SquashFS image.
** Unrecognized filesystem type **
It is expected that most partitions don't contain a SquashFS. This is only
worth a debug message.
When adding log.h put the other includes into the correct order according
to our code style guide.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
---
fs/squashfs/sqfs.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/fs/squashfs/sqfs.c b/fs/squashfs/sqfs.c
index 92ab8ac631..3923e7c996 100644
--- a/fs/squashfs/sqfs.c
+++ b/fs/squashfs/sqfs.c
@@ -10,14 +10,15 @@
#include <asm/unaligned.h>
#include <errno.h>
#include <fs.h>
-#include <linux/types.h>
-#include <linux/byteorder/little_endian.h>
-#include <linux/byteorder/generic.h>
+#include <log.h>
#include <memalign.h>
#include <stdlib.h>
#include <string.h>
#include <squashfs.h>
#include <part.h>
+#include <linux/types.h>
+#include <linux/byteorder/little_endian.h>
+#include <linux/byteorder/generic.h>
#include "sqfs_decompressor.h"
#include "sqfs_filesystem.h"
@@ -1090,7 +1091,7 @@ int sqfs_probe(struct blk_desc *fs_dev_desc, struct disk_partition *fs_partition
/* Make sure it has a valid SquashFS magic number*/
if (get_unaligned_le32(&sblk->s_magic) != SQFS_MAGIC_NUMBER) {
- printf("Bad magic number for SquashFS image.\n");
+ log_debug("Bad magic number for SquashFS image.\n");
ret = -EINVAL;
goto error;
}
--
2.32.0
More information about the U-Boot
mailing list