[U-Boot] [patch] replace mkimage.c write() calls with full_write()
Wolfgang Denk
wd at denx.de
Thu Mar 20 11:35:14 CET 2014
Dear Andrew,
In message <20140320034408.GA20976 at canndrew.org> you wrote:
>
> This patch adds a function to mkimage.c called full_write() which calls write()
> in a loop until all the data has been written or write errors.
>
> I was getting an error with mkimage running out of space on the device it was
> writing to, but instead of printing a useful error message it was printing:
I think your patch itself it OK, but please see [1] for proper coding
style and other patch submission requirements, like adding a commit
message and a sSigne-off-by: line. also make sure to run your patch
through checkpatch.pl before submission - as is I get this:
ERROR: open brace '{' following function declarations go on the next line
#114: FILE: tools/mkimage.c:32:
+static ssize_t full_write(int fd, const void *buf, size_t count) {
ERROR: space required before the open parenthesis '('
#116: FILE: tools/mkimage.c:34:
+ for(;;) {
ERROR: space required before the open parenthesis '('
#119: FILE: tools/mkimage.c:37:
+ if(written < 0)
ERROR: space required before the open parenthesis '('
#123: FILE: tools/mkimage.c:41:
+ if(remaining <= 0)
WARNING: line over 80 characters
#147: FILE: tools/mkimage.c:430:
+ bytes_written = full_write(ifd, (char *)&size, sizeof(size));
ERROR: Missing Signed-off-by: line(s)
total: 5 errors, 1 warnings, 70 lines checked
Thanks.
[1] http://www.denx.de/wiki/view/U-Boot/Patches#General_Patch_Submission_Rules
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"The number of Unix installations has grown to 10, with more
expected." - The Unix Programmer's Manual, 2nd Edition, June, 1972
More information about the U-Boot
mailing list