diff options
author | Clyne Sullivan <tullivan99@gmail.com> | 2018-11-20 10:43:33 -0500 |
---|---|---|
committer | Clyne Sullivan <tullivan99@gmail.com> | 2018-11-20 10:43:33 -0500 |
commit | 22615096dee294f63c6940c17f2a448da51d9197 (patch) | |
tree | cf38db8d010344e445210c35348ec457f33b7a7e /src/user | |
parent | e88b4f9040b63d70563bee8553596f3c317022a5 (diff) |
fs work, initrd/stdio
Diffstat (limited to 'src/user')
-rw-r--r-- | src/user/user.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/user/user.c b/src/user/user.c index dd1aa54..b5ef789 100644 --- a/src/user/user.c +++ b/src/user/user.c @@ -19,10 +19,11 @@ void user_main(void) { gpio(GPIO_MODE, 5, OUTPUT); - int test = vfs_open("A:/hello", VFS_FILE_READ); + int test = vfs_open("B:/hello", VFS_FILE_READ); char *buf = malloc(20); int count = vfs_read(test, 20, (uint8_t *)buf); - (void)count; + buf[count] = '\0'; + vfs_close(test); // if (fork() == 0) { // while (1) { |