From 2a6690e9fd53a02613796764248006e06ac482d6 Mon Sep 17 00:00:00 2001 From: Miguel Date: Sun, 14 Oct 2018 22:36:16 +0200 Subject: ported vim et al --- fs/mount.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'fs/mount.c') diff --git a/fs/mount.c b/fs/mount.c index 62cfe9f..9aa1aeb 100644 --- a/fs/mount.c +++ b/fs/mount.c @@ -6,6 +6,7 @@ #include "log.h" #include "lib/string/string.h" +#include "lib/printf/printf.h" #include "fd.h" @@ -58,12 +59,15 @@ static uint32_t check_match(char *p1, char *p2) */ 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=1; + if(path[0]!='/'){ + kpanic("this works only for absolute paths! supplied: %s",path); + } + for(int i=0;i