This repository has been archived on 2021-05-26. You can view files and clone it, but cannot push or open issues or pull requests.
OS/pintos-env/pintos/examples/mkdir.c

25 lines
363 B
C
Raw Permalink Normal View History

/* mkdir.c
Creates a directory. */
#include <stdio.h>
#include <syscall.h>
int
main (int argc, char *argv[])
{
if (argc != 2)
{
printf ("usage: %s DIRECTORY\n", argv[0]);
return EXIT_FAILURE;
}
if (!mkdir (argv[1]))
{
printf ("%s: mkdir failed\n", argv[1]);
return EXIT_FAILURE;
}
return EXIT_SUCCESS;
}