summaryrefslogtreecommitdiff
path: root/userland/minibox/utilities/touch.c
blob: dd2f072228d598f4fe8d45b5117ad92b0d99bdbb (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], O_CREAT, 0), "open", return 1)
  close(fd);
  return 0;
}