blob: 3802851cabfabb0298c723d52a26cca319bab66e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
#include "kernel.h"
#include "mount.h"
#include "pipe.h"
#include "log.h"
#include "lib/string/string.h"
#define MAX_PIPES 100
/* 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);
}
|