From 3619c820f8ff5918cf122a031bde6305d32f6528 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sun, 10 Jan 2021 13:19:50 +0100 Subject: Started procfs --- kernel/features/fs.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'kernel/features/fs.c') diff --git a/kernel/features/fs.c b/kernel/features/fs.c index 14e6a9c..ab2e236 100644 --- a/kernel/features/fs.c +++ b/kernel/features/fs.c @@ -185,14 +185,12 @@ void device_install(void) { devices = list_new(); - struct vfs *vfs; - struct device *dev; - - vfs = malloc(sizeof(*vfs)); + struct vfs *vfs = malloc(sizeof(*vfs)); vfs->type = VFS_DEVFS; vfs->read = devfs_read; - dev = malloc(sizeof(*dev)); + struct device *dev = malloc(sizeof(*dev)); dev->name = "dev"; + dev->type = DEV_CHAR; dev->vfs = vfs; device_add(dev); vfs_mount(dev, "/dev/"); -- cgit v1.2.3