X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Kernel%2Fvfs%2Fdir.c;h=8cc3fa84f7eac7e7636c073b26ec48b005981085;hb=7b8c541cd83b70296325dbbf047d682fd7b03c22;hp=0fa213d18c05676f45c1a4c6ff53190148878d55;hpb=4e949acb1c98bc071af2d5d9038b4a3e703bf33d;p=tpg%2Facess2.git diff --git a/Kernel/vfs/dir.c b/Kernel/vfs/dir.c index 0fa213d1..8cc3fa84 100644 --- a/Kernel/vfs/dir.c +++ b/Kernel/vfs/dir.c @@ -11,7 +11,9 @@ extern tVFS_Mount *gRootMount; // === PROTOTYPES === +#if 0 int VFS_MkDir(const char *Path); +#endif int VFS_MkNod(const char *Path, Uint Flags); // === CODE === @@ -57,9 +59,9 @@ int VFS_MkNod(const char *Path, Uint Flags) // Check for root if(absPath[0] == '\0') - parent = VFS_ParsePath("/", NULL); + parent = VFS_ParsePath("/", NULL, NULL); else - parent = VFS_ParsePath(absPath, NULL); + parent = VFS_ParsePath(absPath, NULL, NULL); LOG("parent = %p", parent); @@ -121,18 +123,22 @@ int VFS_Symlink(const char *Name, const char *Link) // Get absolue path name _link = VFS_GetAbsPath( Link ); if(!_link) { - Warning("Path '%s' is badly formed", Link); + Log_Warning("VFS", "Path '%s' is badly formed", Link); return -1; } + destNode = VFS_ParsePath( _link, &realLink, NULL ); + #if 0 // Get true path and node - destNode = VFS_ParsePath( _link, &realLink ); free(_link); _link = NULL; + #else + realLink = _link; + #endif // Check if destination exists if(!destNode) { - Warning("File '%s' does not exist, symlink not created", Link); + Log_Warning("VFS", "File '%s' does not exist, symlink not created", Link); return -1; } @@ -141,7 +147,7 @@ int VFS_Symlink(const char *Name, const char *Link) // Make node if( VFS_MkNod(Name, VFS_FFLAG_SYMLINK) != 0 ) { - Warning("Unable to create link node '%s'", Name); + Log_Warning("VFS", "Unable to create link node '%s'", Name); return -2; // Make link node }