[U-Boot] [PATCH 2/3] fw_env: fix incorrect usage of open(O_CREAT)
Joe Hershberger
joe.hershberger at gmail.com
Sat Dec 15 18:57:39 CET 2012
Hi Mike,
On Sat, Nov 10, 2012 at 11:47 PM, Mike Frysinger <vapier at gentoo.org> wrote:
> When using open(), the O_CREAT flag must be given a mode, otherwise it
> uses random garbage from the stack. Also, it can fail to build:
>
> In file included from /usr/include/fcntl.h:290:0,
> from fw_env_main.c:42:
> In function 'open',
> inlined from 'main' at fw_env_main.c:97:9:
> /usr/include/bits/fcntl2.h:50:24: error: call to '__open_missing_mode' declared
> with attribute error: open with O_CREAT in second argument needs 3 arguments
>
> Signed-off-by: Mike Frysinger <vapier at gentoo.org>
Acked-by: Joe Hershberger <joe.hershberger at ni.com>
More information about the U-Boot
mailing list