diff options
Diffstat (limited to 'src/examples/create_file.c')
| -rw-r--r-- | src/examples/create_file.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/examples/create_file.c b/src/examples/create_file.c new file mode 100644 index 0000000..5c1eeb2 --- /dev/null +++ b/src/examples/create_file.c @@ -0,0 +1,22 @@ +/* klaar@ida +*/ + +#include <stdio.h> +#include <syscall.h> + +int main(int argc, char* argv[]) +{ + if (argc != 2) + { + printf("%s: bad arguments\n", argv[0]); + return 1; + } + + while ( open("go") == -1 ) + ; + + if ( ! create(argv[1], 500) ) + return 1; + + return 0; +} |
