2023-07-10 16:24:03 +03:00
|
|
|
#include <errno.h>
|
|
|
|
#include <fcntl.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
int main(int argc, char** argv)
|
|
|
|
{
|
2023-10-25 19:45:18 +03:00
|
|
|
int ret = 0;
|
2023-07-10 16:24:03 +03:00
|
|
|
for (int i = 1; i < argc; i++)
|
|
|
|
{
|
2023-10-25 19:45:18 +03:00
|
|
|
if (creat(argv[i], 0644) == -1 && errno != EEXIST)
|
2023-07-10 16:24:03 +03:00
|
|
|
{
|
2023-10-25 19:45:18 +03:00
|
|
|
perror(argv[i]);
|
|
|
|
ret = 1;
|
2023-07-10 16:24:03 +03:00
|
|
|
}
|
|
|
|
}
|
2023-10-25 19:45:18 +03:00
|
|
|
return ret;
|
2023-07-10 16:24:03 +03:00
|
|
|
}
|