aboutsummaryrefslogtreecommitdiff
path: root/kernel/features/fs.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/features/fs.c')
-rw-r--r--kernel/features/fs.c8
1 files changed, 3 insertions, 5 deletions
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/");