- Timestamp:
- 10/03/08 12:54:00 (2 months ago)
- Location:
- Whitix/branches/keobject
- Files:
-
- 8 modified
-
fs/vfs/dir.c (modified) (1 diff)
-
fs/vfs/load.c (modified) (1 diff)
-
fs/vfs/super.c (modified) (1 diff)
-
include/string.h (modified) (1 diff)
-
kernel/process.c (modified) (1 diff)
-
lib/string.c (modified) (2 diffs)
-
make.inc (modified) (1 diff)
-
memory/mmap.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
Whitix/branches/keobject/fs/vfs/dir.c
r930 r1079 473 473 { 474 474 /* Special case, why search for the root directory when it's known? */ 475 str cpy(current->sCwd, dirName);475 strncpy(current->sCwd, dirName, PATH_MAX); 476 476 477 477 if (current->cwd != current->root) -
Whitix/branches/keobject/fs/vfs/load.c
r1060 r1079 312 312 313 313 /* The child processes have the same current directory as the parent */ 314 str cpy(process->sCwd,current->sCwd);314 strncpy(process->sCwd, current->sCwd, PATH_MAX); 315 315 316 316 process->cwd=current->cwd; -
Whitix/branches/keobject/fs/vfs/super.c
r1061 r1079 379 379 /* Allocate a current directory string for the kernel loading process */ 380 380 current->sCwd=(char*)MemAlloc(PATH_MAX); 381 str cpy(current->sCwd,"/");381 strncpy(current->sCwd, "/", 1); 382 382 383 383 KePrint("VFS: Sucessfully mounted the root filesystem (%s)\n",curr->name); -
Whitix/branches/keobject/include/string.h
r1053 r1079 24 24 25 25 int strncpy(char* dest,char* src,int len); 26 int strcpy(char* dest,char* src);27 26 int strncmp(const char* s1,const char* s2,int num); 28 27 int strlen(char* str); -
Whitix/branches/keobject/kernel/process.c
r984 r1079 84 84 /* Allocate the process's name - used when listing processes or when faulting. */ 85 85 process->name=(char*)MemAlloc(strlen(name)+1); 86 str cpy(process->name, name);86 strncpy(process->name, name, strlen(name)); 87 87 88 88 process->pid=pid++; -
Whitix/branches/keobject/lib/string.c
r1067 r1079 32 32 33 33 SYMBOL_EXPORT(strncpy); 34 35 int strcpy(char* dest,char* src)36 {37 while ((*dest++=*src++));38 return 0;39 }40 41 SYMBOL_EXPORT(strcpy);42 34 43 35 int strncmp(const char* s1,const char* s2,int num) … … 198 190 199 191 ret = MemAlloc(strlen(name) + 1); 200 str cpy(ret, name);192 strncpy(ret, name, strlen(name)); 201 193 202 194 return ret; -
Whitix/branches/keobject/make.inc
r1006 r1079 10 10 SED = sed 11 11 override CFLAGS += -fomit-frame-pointer -ffreestanding -fno-stack-protector -fno-builtin \ 12 -nostdlib -m32 -Wall -Wextra -O 2-I$(DEPTH)include -Wno-unused-parameter12 -nostdlib -m32 -Wall -Wextra -Os -I$(DEPTH)include -Wno-unused-parameter 13 13 BE_VERBOSE = 0 14 14 LD_R_FLAGS = -r -melf_i386 -
Whitix/branches/keobject/memory/mmap.c
r882 r1079 84 84 ret=area->vNode->fileOps->mMap(area->vNode, address, offset); 85 85 else 86 ret=FileGenericReadPage(address, area->vNode,offset);86 ret=FileGenericReadPage(address, area->vNode, offset); 87 87 88 88 if (ret) … … 165 165 address=PAGE_ALIGN(address); 166 166 167 // KePrint("%s: %d: MMapHandleFault(%#X, %d, %d, %d)\n", current->name, current->pid, address, error, VM_WRITE, VM_USER);168 169 167 /* A null pointer has been deferenced */ 170 168 if (!process || address < PAGE_SIZE) 171 169 return -EFAULT; 172 170 171 // KePrint("%s: %d: MMapHandleFault(%#X, %d, %d, %d)\n", current->name, current->pid, address, error, VM_WRITE, VM_USER); 172 173 173 area=VmLookupAddress(process,address); 174 174 175 175 /* Area of memory not currently mapped? */ 176 176 if (!area)
