summaryrefslogtreecommitdiffhomepage
path: root/lib/fs.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/fs.c')
-rw-r--r--lib/fs.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/fs.c b/lib/fs.c
index 485dfb1..d51f61b 100644
--- a/lib/fs.c
+++ b/lib/fs.c
@@ -782,10 +782,10 @@ uc_fs_chown(uc_vm_t *vm, size_t nargs)
if (!uc_fs_resolve_user(user, &uid) ||
!uc_fs_resolve_group(group, &gid))
- return NULL;
+ err_return(errno);
if (chown(ucv_string_get(path), uid, gid) == -1)
- return NULL;
+ err_return(errno);
return ucv_boolean_new(true);
}
@@ -801,7 +801,7 @@ uc_fs_rename(uc_vm_t *vm, size_t nargs)
err_return(EINVAL);
if (rename(ucv_string_get(oldpath), ucv_string_get(newpath)))
- return NULL;
+ err_return(errno);
return ucv_boolean_new(true);
}