summaryrefslogtreecommitdiff
path: root/userspace/cat.c
diff options
context:
space:
mode:
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;
+}