summaryrefslogtreecommitdiffstats
path: root/src/examples
diff options
context:
space:
mode:
Diffstat (limited to 'src/examples')
-rw-r--r--src/examples/create.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/examples/create.c b/src/examples/create.c
index 4805e18..2702552 100644
--- a/src/examples/create.c
+++ b/src/examples/create.c
@@ -4,11 +4,17 @@
int
main (int argc, char *argv[])
{
- if (create("test", 1)) {
- printf("created file\n");
- halt();
+ if (create ("test", 1)) {
+ printf ("created file\n");
} else {
- printf("couldn't create file\n");
- halt();
+ printf ("couldn't create file\n");
}
+ int fd = open ("test");
+ printf ("opened file with fd %d\n", fd);
+ int fd2 = open ("test");
+ printf ("opened file with fd %d\n", fd2);
+ int fd3 = open ("test");
+ printf ("opened file with fd %d\n", fd3);
+
+ halt ();
}