aboutsummaryrefslogtreecommitdiffstats
path: root/ports/unix/guts/fchmod.c
diff options
context:
space:
mode:
Diffstat (limited to 'ports/unix/guts/fchmod.c')
-rw-r--r--ports/unix/guts/fchmod.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ports/unix/guts/fchmod.c b/ports/unix/guts/fchmod.c
index 7c6a6ad..1d4fae8 100644
--- a/ports/unix/guts/fchmod.c
+++ b/ports/unix/guts/fchmod.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008-2010 Wind River Systems; see
+ * Copyright (c) 2008-2010, 2012 Wind River Systems; see
* guts/COPYRIGHT for information.
*
* static int
@@ -7,15 +7,15 @@
* int rc = -1;
*/
pseudo_msg_t *msg;
- struct stat buf;
+ PSEUDO_STATBUF buf;
int save_errno = errno;
- if (real_fstat(fd, &buf) == -1) {
+ if (base_fstat(fd, &buf) == -1) {
/* can't stat it, can't chmod it */
return -1;
}
buf.st_mode = (buf.st_mode & ~07777) | (mode & 07777);
- msg = pseudo_client_op_plain(OP_FCHMOD, 0, fd, -1, 0, &buf);
+ msg = pseudo_client_op(OP_FCHMOD, 0, fd, -1, 0, &buf);
real_fchmod(fd, PSEUDO_FS_MODE(mode, S_ISDIR(buf.st_mode)));
if (msg && msg->result != RESULT_SUCCEED) {
errno = EPERM;