summaryrefslogtreecommitdiffstats
path: root/usr/klibc/tests/opentest.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr/klibc/tests/opentest.c')
-rw-r--r--usr/klibc/tests/opentest.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/usr/klibc/tests/opentest.c b/usr/klibc/tests/opentest.c
new file mode 100644
index 0000000..8be7b3d
--- /dev/null
+++ b/usr/klibc/tests/opentest.c
@@ -0,0 +1,15 @@
+#include <stdio.h>
+
+int main(void)
+{
+ char buffer[1024];
+ FILE *f;
+
+ f = fopen("/etc/passwd", "r");
+ fgets(buffer, 1024, f);
+ fclose(f);
+
+ printf("Line 1 = %s", buffer);
+
+ return 0;
+}