summaryrefslogtreecommitdiff
path: root/Userland/rmdir.cpp
blob: 8d84f8cc67015b10a0cead11bdb70fb43b0abdc4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <stdio.h>
#include <errno.h>
#include <unistd.h>

int main(int argc, char** argv)
{
    if (argc != 2) {
        fprintf(stderr, "usage: rmdir <path>\n");
        return 1;
    }
    int rc = rmdir(argv[1]);
    if (rc < 0) {
        perror("rmdir");
        return 1;
    }
    return 0;
}