提交 67806596 编写于 作者: C chenwei

feat: add uid/gid for ProcFs

close: #I3WGVP
Signed-off-by: Nchenwei <chenwei26@huawei.com>
上级 e5a3ee6f
......@@ -89,6 +89,8 @@ struct ProcFileOperations {
};
struct ProcDirEntry {
uint uid;
uint gid;
mode_t mode;
int flags;
const struct ProcFileOperations *procFileOps;
......
......@@ -60,11 +60,9 @@ static struct Vnode *EntryToVnode(struct ProcDirEntry *entry)
node->fop = &g_procfsFops;
node->data = entry;
node->type = entry->type;
if (node->type == VNODE_TYPE_DIR) {
node->mode = S_IFDIR | PROCFS_DEFAULT_MODE;
} else {
node->mode = S_IFREG | PROCFS_DEFAULT_MODE;
}
node->uid = entry->uid;
node->gid = entry->gid;
node->mode = entry->mode;
return node;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册