X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/75339638bc5f21f13d3475374ecbd91065a427c3..0b6fbe304e14f104a9e8cf43a09bf60709d44207:/lunaix-os/kernel/proc0.c?ds=inline diff --git a/lunaix-os/kernel/proc0.c b/lunaix-os/kernel/proc0.c index abd0ac0..c38ad2b 100644 --- a/lunaix-os/kernel/proc0.c +++ b/lunaix-os/kernel/proc0.c @@ -2,6 +2,7 @@ #include #include #include +#include #include #include #include @@ -48,14 +49,14 @@ mount_bootmedium() { struct v_dnode* dnode; int errno = 0; - if ((errno = vfs_walk_proc("/dev/sdb", &dnode, NULL, 0))) { + struct device* dev = probe_boot_medium(); + if (!dev) { kprintf(KERROR "fail to acquire device. (%d)", errno); return 0; } - struct device* dev = (struct device*)dnode->inode->data; if ((errno = vfs_mount("/mnt/lunaix-os", "iso9660", dev, 0))) { - kprintf(KERROR "fail to boot medium. (%d)", errno); + kprintf(KERROR "fail to mount boot medium. (%d)", errno); return 0; }