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/ext2.c | 2 +- fs/mount.c | 18 ++++++++++++++++-- 2 files changed, 17 insertions(+), 3 deletions(-) (limited to 'fs') diff --git a/fs/ext2.c b/fs/ext2.c index 49484c4..9b41d6c 100644 --- a/fs/ext2.c +++ b/fs/ext2.c @@ -238,7 +238,7 @@ static uint32_t ext2_filename_to_inode_traverse(uint32_t ext2_start_addr, char * } } - klog("file not found!"); + klog("file not found! : %s",path); return 0; } 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