Files
banan-os/userspace/programs/touch/main.cpp
Bananymous 8ddab05ed3 BuildSystem: Cleanup userspace directory layout
userspace programs are now in userspace/programs
userspace tests are now in userspace/tests

This makes listing userspace projects much cleaner. Libraries were
already separated to their own directory, so other programs should also.
2024-07-03 09:18:02 +03:00

18 lines
252 B
C++

#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
int main(int argc, char** argv)
{
int ret = 0;
for (int i = 1; i < argc; i++)
{
if (creat(argv[i], 0644) == -1 && errno != EEXIST)
{
perror(argv[i]);
ret = 1;
}
}
return ret;
}