From 1e08b64b43bf9c50b644da3f76d5a8bcc73f62da Mon Sep 17 00:00:00 2001 From: Miguel Date: Wed, 19 Sep 2018 01:52:14 +0200 Subject: addding sysfs and pipes etc --- fs/sysfs.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'fs/sysfs.c') diff --git a/fs/sysfs.c b/fs/sysfs.c index 57a56c8..de679f2 100644 --- a/fs/sysfs.c +++ b/fs/sysfs.c @@ -1,6 +1,6 @@ #include "mount.h" +#include #include "sysfs.h" - #include "mem.h" #include "kmalloc.h" #include "mount.h" @@ -9,10 +9,13 @@ #include "lib/string/string.h" -static const char* names[] = {"/mem","/kmalloc","/mount"}; -static uint32_t map[]={mem_sysfs,kmalloc_sysfs,mount_sysfs}; -static uint32_t count=3; +static const char* names[] = {"mem","kmalloc","mount"}; +static uint32_t map[]={mem_sysfs,mem_sysfs_set, + kmalloc_sysfs,NULL, + mount_sysfs,NULL, + }; +static uint32_t count=3; /* mount interface */ @@ -22,15 +25,16 @@ fd sysfs_file_open(mount *m,char *path) for (int i=0;i=count)return 0; memcpy(dirs->name,names[*pos],strlen(names[*pos])+1); + dirs->inode=0; *pos+=1; return 1; } -- cgit v1.2.3