Whamcloud - gitweb
Landing the mds_lock_devel branch on the trunk. Notables:
[fs/lustre-release.git] / lustre / tests / mcreate.c
diff --git a/lustre/tests/mcreate.c b/lustre/tests/mcreate.c
new file mode 100644 (file)
index 0000000..0d8cd36
--- /dev/null
@@ -0,0 +1,23 @@
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <errno.h>
+#include <string.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+int main(int argc, char ** argv)
+{
+        int rc;
+
+        if (argc < 2) { 
+                printf("Usage %s filename\n", argv[0]);
+                return 1;
+        }
+
+        rc = mknod(argv[1], S_IFREG| 0444, 0);
+        if (rc) { 
+                printf("error: %s\n", strerror(errno));
+        }
+        return rc;
+}