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:
parent
22d747e264
commit
06bf4ad55b
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue