aboutsummaryrefslogtreecommitdiffstats
path: root/src/fs/stdio.c
diff options
context:
space:
mode:
authorClyne Sullivan <clyne@bitgloo.com>2020-01-24 09:15:46 -0500
committerClyne Sullivan <clyne@bitgloo.com>2020-01-24 09:15:46 -0500
commita5892b35233748b2fcff1f726314c9a8df749f9c (patch)
treea666f7f73b8926b2518b578b9416209395908a6e /src/fs/stdio.c
parent998b3ac86e3b3f926d81e768f1200815e9e3d148 (diff)
Reviewed stmos, made small format/doc fixes
Diffstat (limited to 'src/fs/stdio.c')
-rw-r--r--src/fs/stdio.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/fs/stdio.c b/src/fs/stdio.c
index e15003d..aeb8d73 100644
--- a/src/fs/stdio.c
+++ b/src/fs/stdio.c
@@ -39,6 +39,9 @@ const vfs_volume_funcs stdio_funcs = {
void *stdio_open(const char *path)
{
+ /**
+ * All we need is the correct file handle number.
+ */
int *id = malloc(sizeof(uint32_t));
if (path[0] == 'o' && path[1] == 'u' && path[2] == 't')
@@ -53,13 +56,13 @@ void *stdio_open(const char *path)
int stdio_close(vfs_file_info *info)
{
- // Nothing to do
free(info->fsinfo);
return 0;
}
uint32_t stdio_read(vfs_file_info *info, uint32_t count, uint8_t *buffer)
{
+ // TODO?
(void)info;
(void)count;
(void)buffer;
@@ -68,6 +71,7 @@ uint32_t stdio_read(vfs_file_info *info, uint32_t count, uint8_t *buffer)
uint32_t stdio_write(vfs_file_info *info, uint32_t count, const uint8_t *buffer)
{
+ // For now, output to serial
(void)info;
for (uint32_t i = 0; i < count; i++)
serial_put(buffer[i]);