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

Signed-off-by: Mike Chan <mike@android.com>
diff --git a/init/builtins.c b/init/builtins.c
index 93ce6e8..16601ce 100644
--- a/init/builtins.c
+++ b/init/builtins.c
@@ -49,7 +49,7 @@
     fd = open(path, O_WRONLY|O_CREAT, 0622);
 
     if (fd < 0)
-        return -1;
+        return -errno;
 
     len = strlen(value);
 
@@ -59,7 +59,7 @@
 
     close(fd);
     if (ret < 0) {
-        return -1;
+        return -errno;
     } else {
         return 0;
     }