commands: ubiupdatevol: confirm success with return value 0
Treat the write() case analogously to the read() case and do not return the number of most recently written bytes as the status of sucessful command execution. Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
90494c6f7e
commit
fbdfa76ccf
|
@ -65,9 +65,10 @@ static int do_ubiupdatevol(int argc, char *argv[])
|
|||
break;
|
||||
}
|
||||
|
||||
ret = write(fd_vol, buf, count);
|
||||
if (ret < 0) {
|
||||
count = write(fd_vol, buf, count);
|
||||
if (count < 0) {
|
||||
perror("write");
|
||||
ret = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue