diff --git a/src/bin/shell/main.c b/src/bin/shell/main.c index 2342de7..c9e10fc 100644 --- a/src/bin/shell/main.c +++ b/src/bin/shell/main.c @@ -39,14 +39,12 @@ machine = (char *)malloc(32); cwd = (char *)malloc(1024); - cwc = (char *)malloc(32); sprintf(machine,"uBixCube"); getcwd(cwd,1024); - sprintf(cwc,"sys"); while (1) { - printf("%s@%s:%s> ",machine,cwc,cwd); + printf("%s@%s> ",machine,cwd); gets((char *)buffer); data = (uInt8 *)buffer; parseInput(inBuf,data); diff --git a/src/sys/kernel/file.c b/src/sys/kernel/file.c index 28d8f64..2865cd8 100644 --- a/src/sys/kernel/file.c +++ b/src/sys/kernel/file.c @@ -221,7 +221,12 @@ } void sysChDir(const char *path) { - sprintf(_current->oInfo.cwd,path); + if (strstr(path,":") == 0x0) { + sprintf(_current->oInfo.cwd,"%s%s",_current->oInfo.cwd,path); + } + else { + sprintf(_current->oInfo.cwd,path); + } } void sysUnlink(const char *path,int *retVal) { @@ -258,6 +263,9 @@ /*** $Log$ + Revision 1.5 2004/06/26 01:24:44 reddawg + Fixens + Revision 1.4 2004/06/16 19:56:35 reddawg Moved fclose diff --git a/src/sys/vfs/file.c b/src/sys/vfs/file.c index 4afe93d..c6788d8 100644 --- a/src/sys/vfs/file.c +++ b/src/sys/vfs/file.c @@ -87,6 +87,7 @@ char *dir = 0x0,*mountPoint = 0x0; rootPath[0] = '\0'; dir = (char *)path; + while (strstr(path,"/")) { if (rootPath[0] == 0x0) sprintf(rootPath,"%s/",strtok(dir,"/")); @@ -94,6 +95,10 @@ sprintf(rootPath,"%s/%s",rootPath,strtok(dir,"/")); dir = strtok(NULL,"\n"); } + + if (strstr(path,":") == 0x0) { + sprintf(rootPath,_current->oInfo.cwd); + } kprintf("rootPath: [%s]\n",rootPath); tmpFD = fopen(rootPath,"rb"); @@ -237,6 +242,9 @@ /*** $Log$ + Revision 1.6 2004/06/28 23:12:58 reddawg + file format now container:/path/to/file + Revision 1.5 2004/06/16 19:56:35 reddawg Moved fclose