[devmgr][memfs] enable pipeline-style connections to the root fs

Change-Id: I5eebb05ef28b77823826d868b50870f918f99395
Esse commit está contido em:
Brian Swetland
2017-09-11 14:51:32 -07:00
commit 54b8648a7b
3 arquivos alterados com 11 adições e 0 exclusões
+2
Ver Arquivo
@@ -174,7 +174,9 @@ void vfs_global_init(VnodeDir* root);
// generate mxremoteio handles
mx_handle_t vfs_create_global_root_handle(void);
mx_status_t vfs_connect_global_root_handle(mx_handle_t h);
mx_handle_t vfs_create_root_handle(VnodeMemfs* vn);
mx_status_t vfs_connect_root_handle(VnodeMemfs* vn, mx_handle_t h);
// device fs
mx_status_t devfs_mount(mx_handle_t h);
+5
Ver Arquivo
@@ -809,3 +809,8 @@ mx_handle_t vfs_create_root_handle(VnodeMemfs* vn) {
}
return h2.release();
}
mx_status_t vfs_connect_root_handle(VnodeMemfs* vn, mx_handle_t h) {
mx::channel ch(h);
return memfs::vfs.ServeDirectory(fbl::RefPtr<fs::Vnode>(vn), fbl::move(ch));
}
+4
Ver Arquivo
@@ -51,3 +51,7 @@ void vfs_global_init(VnodeDir* root) {
mx_handle_t vfs_create_global_root_handle() {
return vfs_create_root_handle(memfs::global_vfs_root);
}
mx_status_t vfs_connect_global_root_handle(mx_handle_t h) {
return vfs_connect_root_handle(memfs::global_vfs_root, h);
}