From 22615096dee294f63c6940c17f2a448da51d9197 Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Tue, 20 Nov 2018 10:43:33 -0500 Subject: fs work, initrd/stdio --- src/user/user.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/user') 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) { -- cgit v1.2.3