From 1e08b64b43bf9c50b644da3f76d5a8bcc73f62da Mon Sep 17 00:00:00 2001 From: Miguel Date: Wed, 19 Sep 2018 01:52:14 +0200 Subject: addding sysfs and pipes etc --- fs/mount.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'fs/mount.c') diff --git a/fs/mount.c b/fs/mount.c index 009647a..01a90b2 100644 --- a/fs/mount.c +++ b/fs/mount.c @@ -27,7 +27,7 @@ void mount_add(mount mnt) { if(mounts_count==MAX_MOUNTS)kpanic("maxium number of mounts exceeded. increase MAX_MOUNTS in kernel.h and recomplie kernel."); mounts[mounts_count++]=mnt; - klog("mounted %s",mnt.path); + klog("Mounted %s at %s",mount_type_to_str(mnt.type),mnt.path); } void mount_dump() @@ -70,8 +70,9 @@ static char* get_mount_for_path(char *path,mount *mnt) { if(path[0]!='/')kpanic("this works only for absolute paths!"); + // start with root as default uint32_t best=0; - uint32_t best_len=0; + uint32_t best_len=1; for(int i=0;i