aboutsummaryrefslogtreecommitdiffstats
path: root/ports
diff options
context:
space:
mode:
Diffstat (limited to 'ports')
-rw-r--r--ports/darwin/guts/stat.c2
-rw-r--r--ports/unix/guts/fchown.c11
-rw-r--r--ports/unix/guts/fchownat.c14
-rw-r--r--ports/unix/guts/linkat.c2
4 files changed, 11 insertions, 18 deletions
diff --git a/ports/darwin/guts/stat.c b/ports/darwin/guts/stat.c
index 1e1cf67..8a0742c 100644
--- a/ports/darwin/guts/stat.c
+++ b/ports/darwin/guts/stat.c
@@ -20,7 +20,7 @@
* don't need to check for a symlink on this end
*/
msg = pseudo_client_op(OP_STAT, 0, -1, AT_FDCWD, path, buf);
- if (msg) {
+ if (msg && msg->result == RESULT_SUCCEED) {
pseudo_stat_msg(buf, msg);
}
diff --git a/ports/unix/guts/fchown.c b/ports/unix/guts/fchown.c
index 6e33f0f..89cabe2 100644
--- a/ports/unix/guts/fchown.c
+++ b/ports/unix/guts/fchown.c
@@ -20,15 +20,10 @@
if (owner == (uid_t) -1 || group == (gid_t) -1) {
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(&buf, msg);
- } else {
- pseudo_debug(PDBGF_FILE, "fchown fd %d, ino %llu, unknown file.\n",
- fd, (unsigned long long) buf.st_ino);
- }
+ if (msg && msg->result == RESULT_SUCCEED) {
+ pseudo_stat_msg(&buf, msg);
} else {
- pseudo_diag("stat within chown of fd %d [%llu] failed.\n",
+ pseudo_debug(PDBGF_FILE, "fchown fd %d, ino %llu, unknown file.\n",
fd, (unsigned long long) buf.st_ino);
}
}
diff --git a/ports/unix/guts/fchownat.c b/ports/unix/guts/fchownat.c
index f976d91..295726b 100644
--- a/ports/unix/guts/fchownat.c
+++ b/ports/unix/guts/fchownat.c
@@ -36,14 +36,12 @@
if (owner == (uid_t) -1 || group == (gid_t) -1) {
msg = pseudo_client_op(OP_STAT, 0, -1, -1, path, &buf);
/* copy in any existing values... */
- if (msg) {
- if (msg->result == RESULT_SUCCEED) {
- pseudo_stat_msg(&buf, msg);
- } else {
- pseudo_debug(PDBGF_FILE, "chownat to %d:%d on %d/%s, ino %llu, new file.\n",
- owner, group, dirfd, path,
- (unsigned long long) buf.st_ino);
- }
+ if (msg && msg->result == RESULT_SUCCEED) {
+ pseudo_stat_msg(&buf, msg);
+ } else {
+ pseudo_debug(PDBGF_FILE, "chownat to %d:%d on %d/%s, ino %llu, new file.\n",
+ owner, group, dirfd, path,
+ (unsigned long long) buf.st_ino);
}
}
/* now override with arguments */
diff --git a/ports/unix/guts/linkat.c b/ports/unix/guts/linkat.c
index fe29b39..ec27e47 100644
--- a/ports/unix/guts/linkat.c
+++ b/ports/unix/guts/linkat.c
@@ -55,7 +55,7 @@
return rc;
}
msg = pseudo_client_op(OP_STAT, 0, -1, -1, oldpath, &buf);
- if (msg) {
+ if (msg && msg->result == RESULT_SUCCEED) {
pseudo_stat_msg(&buf, msg);
}
/* Long story short: I am pretty sure we still want OP_LINK even