9
0
Fork 0

ubiformat: open flash image readonly

ubiformat only needs readonly access to the image to flash, so
open it readonly. Opening r/w may fail for example on tftp servers.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Sascha Hauer 2013-02-20 12:26:37 +01:00
parent 22d747e264
commit 06bf4ad55b
1 changed files with 1 additions and 1 deletions

View File

@ -233,7 +233,7 @@ static int open_file(off_t *sz)
return sys_errmsg("cannot open \"%s\"", args.image);
*sz = st.st_size;
fd = open(args.image, O_RDWR);
fd = open(args.image, O_RDONLY);
if (fd < 0)
return sys_errmsg("cannot open \"%s\"", args.image);