aboutsummaryrefslogtreecommitdiffstats
path: root/ports/unix/guts/rename.c
diff options
context:
space:
mode:
Diffstat (limited to 'ports/unix/guts/rename.c')
-rw-r--r--ports/unix/guts/rename.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/ports/unix/guts/rename.c b/ports/unix/guts/rename.c
index 04892c1..1473a8d 100644
--- a/ports/unix/guts/rename.c
+++ b/ports/unix/guts/rename.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,7 +7,7 @@
* int rc = -1;
*/
pseudo_msg_t *msg;
- struct stat oldbuf, newbuf;
+ PSEUDO_STATBUF oldbuf, newbuf;
int oldrc, newrc;
int save_errno;
int old_db_entry = 0;
@@ -23,14 +23,14 @@
save_errno = errno;
- newrc = real_lstat(newpath, &newbuf);
- oldrc = real_lstat(oldpath, &oldbuf);
+ newrc = base_lstat(newpath, &newbuf);
+ oldrc = base_lstat(oldpath, &oldbuf);
errno = save_errno;
/* newpath must be removed. */
/* as with unlink, we have to mark that the file may get deleted */
- msg = pseudo_client_op_plain(OP_MAY_UNLINK, 0, -1, -1, newpath, newrc ? NULL : &newbuf);
+ msg = pseudo_client_op(OP_MAY_UNLINK, 0, -1, -1, newpath, newrc ? NULL : &newbuf);
if (msg && msg->result == RESULT_SUCCEED)
old_db_entry = 1;
rc = real_rename(oldpath, newpath);
@@ -40,10 +40,10 @@
/* since we failed, that wasn't really unlinked -- put
* it back.
*/
- pseudo_client_op_plain(OP_CANCEL_UNLINK, 0, -1, -1, newpath, &newbuf);
+ pseudo_client_op(OP_CANCEL_UNLINK, 0, -1, -1, newpath, &newbuf);
} else {
/* confirm that the file was removed */
- pseudo_client_op_plain(OP_DID_UNLINK, 0, -1, -1, newpath, &newbuf);
+ pseudo_client_op(OP_DID_UNLINK, 0, -1, -1, newpath, &newbuf);
}
}
if (rc == -1) {
@@ -86,9 +86,9 @@
}
pseudo_debug(1, "creating new '%s' [%llu] to rename\n",
oldpath, (unsigned long long) oldbuf.st_ino);
- pseudo_client_op_plain(OP_LINK, 0, -1, -1, oldpath, &oldbuf);
+ pseudo_client_op(OP_LINK, 0, -1, -1, oldpath, &oldbuf);
}
- pseudo_client_op_plain(OP_RENAME, 0, -1, -1, newpath, &oldbuf, oldpath);
+ pseudo_client_op(OP_RENAME, 0, -1, -1, newpath, &oldbuf, oldpath);
errno = save_errno;
/* return rc;