summaryrefslogtreecommitdiff
path: root/userspace/cat.c
diff options
context:
space:
mode:
authorMichal Idziorek <m.i@gmx.at>2015-05-13 23:58:39 +0200
committerMichal Idziorek <m.i@gmx.at>2015-05-13 23:58:39 +0200
commitb74c5c8fb4de3b2847bc942e57dcf8f0dea705be (patch)
treefa0a9001cffa64c9193689066bf296dc3df7f844 /userspace/cat.c
parent9a60edf72a3112adae4a914134da1adaf472ad5d (diff)
fixed libc and 'userspace'
Diffstat (limited to 'userspace/cat.c')
-rw-r--r--userspace/cat.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/userspace/cat.c b/userspace/cat.c
new file mode 100644
index 0000000..a371397
--- /dev/null
+++ b/userspace/cat.c
@@ -0,0 +1,17 @@
+#include <stdio.h>
+
+int main()
+{
+ FILE *f = fopen("README", "r");
+
+ if (f == NULL)
+ {
+ perror("unable to open file");
+ return 1;
+ }
+
+ puts("open success");
+ fclose(f);
+
+ return 0;
+}