#include "kernel.h" #include "mount.h" #include "pipe.h" #include "log.h" #include "lib/string/string.h" /* mount interface */ fd pipe_file_open(mount *m,char *path) { fd a; a.type=FD_TYPE_PIPE; // return fd_from_ return a; } int pipe_read_dir(mount *m,char *path, fs_dirent *dirs, uint32_t *pos) { /* if(*pos>=count)return 0; memcpy(dirs->name,names[*pos],strlen(names[*pos])+1); *pos+=1; return 1; */ return 0; } void pipe_mount(char* path) { mount m; m.type=MOUNT_TYPE_PIPES; memcpy(m.path,path,strlen(path)+1); m.mount_file_open=pipe_file_open; m.mount_read_dir=pipe_read_dir; mount_add(m); }