git://scm.lunaixsky.com
/
lunaix-os.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rewrite the device subsystem interfaces (#48)
[lunaix-os.git]
/
lunaix-os
/
kernel
/
fs
/
mount.c
diff --git
a/lunaix-os/kernel/fs/mount.c
b/lunaix-os/kernel/fs/mount.c
index 0f3b3fb7d42e807c22394ee354a5a342511f5ceb..c673e8418b6866541d8b413e68e5c72ea689806e 100644
(file)
--- a/
lunaix-os/kernel/fs/mount.c
+++ b/
lunaix-os/kernel/fs/mount.c
@@
-288,6
+288,7
@@
__DEFINE_LXSYSCALL4(int,
int,
options)
{
int,
options)
{
+ struct device* device = NULL;
struct v_dnode *dev = NULL, *mnt = NULL;
int errno = 0;
struct v_dnode *dev = NULL, *mnt = NULL;
int errno = 0;
@@
-308,16
+309,14
@@
__DEFINE_LXSYSCALL4(int,
goto done;
}
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;
}
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);
}
errno = vfs_mount_at(fstype, device, mnt, options);