# Test programs to compile, and a list of sources for each.
# To add a new test, put its name on the PROGS list
# and then add a name_SRC line that lists its source files.
-PROGS = bubsort echo halt insult lineup matmult recursor shell
+PROGS = bubsort echo halt insult lineup ls matmult mkdir recursor shell
bubsort_SRC = bubsort.c
echo_SRC = echo.c
halt_SRC = halt.c
matmult_SRC = matmult.c
recursor_SRC = recursor.c
shell_SRC = shell.c
+ls_SRC = ls.c
+mkdir_SRC = mkdir.c
include $(SRCDIR)/Makefile.userprog
--- /dev/null
+/* mkdir.c
+
+ Creates a directory. */
+
+#include <stdio.h>
+#include <syscall.h>
+
+int
+main (int argc, char *argv[])
+{
+ if (argc != 2)
+ PANIC ("usage: %s DIRECTORY\n", argv[0]);
+
+ if (!mkdir (argv[1]))
+ PANIC ("%s: mkdir failed\n", argv[1]);
+
+ return 0;
+}