init now returns proper error codes in dmesg for write command (init.rc)

Signed-off-by: Mike Chan <mike@android.com>
This commit is contained in:
Mike Chan 2009-06-29 20:30:55 -07:00
parent a65044fad8
commit 008abac082
1 changed files with 2 additions and 2 deletions

View File

@ -49,7 +49,7 @@ static int write_file(const char *path, const char *value)
fd = open(path, O_WRONLY|O_CREAT, 0622);
if (fd < 0)
return -1;
return -errno;
len = strlen(value);
@ -59,7 +59,7 @@ static int write_file(const char *path, const char *value)
close(fd);
if (ret < 0) {
return -1;
return -errno;
} else {
return 0;
}