Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ae55691
)
Add mrename program to avoid GNU "mv" changing args and doing lstat.
author
adilger
<adilger>
Thu, 25 Sep 2003 08:57:57 +0000
(08:57 +0000)
committer
adilger
<adilger>
Thu, 25 Sep 2003 08:57:57 +0000
(08:57 +0000)
lustre/tests/mrename.c
[new file with mode: 0644]
patch
|
blob
diff --git a/lustre/tests/mrename.c
b/lustre/tests/mrename.c
new file mode 100644
(file)
index 0000000..
1c18880
--- /dev/null
+++ b/
lustre/tests/mrename.c
@@ -0,0
+1,19
@@
+#include <stdlib.h>
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+
+int main(int argc, char *argv[])
+{
+ int rc;
+
+ if (argc != 3) {
+ fprintf(stderr, "usage: %s from to\n", argv[0]);
+ exit(1);
+ }
+
+ rc = rename(argv[1], argv[2]);
+ printf("rename returned %d: %s\n", rc, strerror(errno));
+
+ return rc;
+}