aboutsummaryrefslogtreecommitdiffstats
path: root/ports/unix/guts/fchown.c
diff options
context:
space:
mode:
Diffstat (limited to 'ports/unix/guts/fchown.c')
-rw-r--r--ports/unix/guts/fchown.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/ports/unix/guts/fchown.c b/ports/unix/guts/fchown.c
index c36a869..72a1e46 100644
--- a/ports/unix/guts/fchown.c
+++ b/ports/unix/guts/fchown.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,10 +7,10 @@
* int rc = -1;
*/
pseudo_msg_t *msg;
- struct stat buf;
+ PSEUDO_STATBUF buf;
int save_errno;
- if (real_fstat(fd, &buf) == -1) {
+ if (base_fstat(fd, &buf) == -1) {
save_errno = errno;
pseudo_debug(2, "fchown failing because fstat failed: %s\n",
strerror(errno));
@@ -18,11 +18,11 @@
return -1;
}
if (owner == (uid_t) -1 || group == (gid_t) -1) {
- msg = pseudo_client_op_plain(OP_STAT, 0, fd, -1, NULL, &buf);
+ msg = pseudo_client_op(OP_STAT, 0, fd, -1, NULL, &buf);
/* copy in any existing values... */
if (msg) {
if (msg->result == RESULT_SUCCEED) {
- pseudo_stat_msg_plain(&buf, msg);
+ pseudo_stat_msg(&buf, msg);
} else {
pseudo_debug(2, "fchown fd %d, ino %llu, unknown file.\n",
fd, (unsigned long long) buf.st_ino);
@@ -41,7 +41,7 @@
}
pseudo_debug(2, "fchown, fd %d: %d:%d -> %d:%d\n",
fd, owner, group, buf.st_uid, buf.st_gid);
- msg = pseudo_client_op_plain(OP_FCHOWN, 0, fd, -1, 0, &buf);
+ msg = pseudo_client_op(OP_FCHOWN, 0, fd, -1, 0, &buf);
if (msg && msg->result != RESULT_SUCCEED) {
errno = EPERM;
rc = -1;