X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/6123a1b5c5c97d90224ffa0dc6706dd7af2ebb9e..6942ebae59c3904674dce6b67cd07c43a3bbe00d:/lunaix-os/kernel/fs/mount.c diff --git a/lunaix-os/kernel/fs/mount.c b/lunaix-os/kernel/fs/mount.c index 0f3b3fb..c673e84 100644 --- a/lunaix-os/kernel/fs/mount.c +++ b/lunaix-os/kernel/fs/mount.c @@ -288,6 +288,7 @@ __DEFINE_LXSYSCALL4(int, int, options) { + struct device* device = NULL; struct v_dnode *dev = NULL, *mnt = NULL; int errno = 0; @@ -308,16 +309,14 @@ __DEFINE_LXSYSCALL4(int, goto done; } - // By our convention. - // XXX could we do better? - struct device* device = NULL; - if (dev) { if (!check_voldev_node(dev->inode)) { errno = ENOTDEV; goto done; } - device = (struct device*)dev->inode->data; + + device = resolve_device(dev->inode->data); + assert(device); } errno = vfs_mount_at(fstype, device, mnt, options);