[U-Boot] [PATCH 1/1] fs: remove distractive message in fs_read()

Heinrich Schuchardt xypron.glpk at gmx.de
Mon Jan 1 20:15:37 UTC 2018


The message
"** %s shorter than offset + len **\n"
may be interesting when debugging but it does not indicate an
error.

So we should not write it if we are not in debug mode.

Fixes: 7a3e70cfd88c fs/fs.c: read up to EOF when len would read past EOF
Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
---
 fs/fs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/fs.c b/fs/fs.c
index 9c4d67faf8..6155cb1daf 100644
--- a/fs/fs.c
+++ b/fs/fs.c
@@ -407,7 +407,7 @@ int fs_read(const char *filename, ulong addr, loff_t offset, loff_t len,
 
 	/* If we requested a specific number of bytes, check we got it */
 	if (ret == 0 && len && *actread != len)
-		printf("** %s shorter than offset + len **\n", filename);
+		debug("** %s shorter than offset + len **\n", filename);
 	fs_close();
 
 	return ret;
-- 
2.14.2



More information about the U-Boot mailing list