commands: edit: properly propagate error code
Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
aa6694b542
commit
0569bb12a6
|
@ -266,7 +266,7 @@ static int save_file(const char *path)
|
|||
fd = open(path, O_WRONLY | O_TRUNC | O_CREAT);
|
||||
if (fd < 0) {
|
||||
printf("could not open file for writing: %s\n", errno_str());
|
||||
return -1;
|
||||
return fd;
|
||||
}
|
||||
|
||||
line = buffer;
|
||||
|
|
Loading…
Reference in New Issue