summaryrefslogtreecommitdiff
path: root/userland/minibox/utilities/touch.c
blob: 949ad969cf4f8edc8dc2c8c5a469c3f330aaf64b (plain)
1
2
3
4
5
6
7
8
9
10
11
#include "include.h"
#include <fcntl.h>

int touch_main(int argc, char **argv) {
  if (argc < 2)
    return 1;
  int fd;
  COND_PERROR_EXP(open(argv[1], 0, O_CREAT), "open", return 1)
  close(fd);
  return 0;
}