[devmgr][memfs] enable pipeline-style connections to the root fs
Change-Id: I5eebb05ef28b77823826d868b50870f918f99395
Esse commit está contido em:
@@ -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);
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
Referência em uma Nova Issue
Bloquear um usuário