Whamcloud - gitweb
land v0.9.1 on HEAD, in preparation for a 1.0.x branch
[fs/lustre-release.git] / lustre / tests / mrename.c
diff --git a/lustre/tests/mrename.c b/lustre/tests/mrename.c
new file mode 100644 (file)
index 0000000..1c18880
--- /dev/null
@@ -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;
+}