Skip to contentSkip to conversation

fs: remove distractive message in fs_read()

PATCH New Heinrich Schuchardt 3 participants 3 messages Jan 1, 2018 – Jan 19, 2018 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fs: remove distractive message in fs_read()

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
---
 fs/fs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/fs.c +1 -1
index 9c4d67faf8..6155cb1daf 100644
@@ -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;
Signature · 1 line
2.14.2
#1 lore raw

PATCH 1/1 fs: remove distractive message in fs_read()

Quoted 5 lines · Heinrich Schuchardt

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

Quoted 7 lines

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
---
 fs/fs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
#2 lore raw

PATCH 1/1 fs: remove distractive message in fs_read()

In reply to Heinrich Schuchardt
Quoted 10 lines · Heinrich Schuchardt

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

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180119/ff307532/attachment.sig>