Changeset 1060
- Timestamp:
- 10/03/08 12:18:00 (3 months ago)
- Files:
-
- 1 modified
-
Whitix/branches/keobject/fs/vfs/load.c (modified) (12 diffs)
Legend:
- Unmodified
- Added
- Removed
-
Whitix/branches/keobject/fs/vfs/load.c
r881 r1060 139 139 /* Failed to find a space? Unlikely. */ 140 140 if (!argAddr) 141 {142 KePrint("ExecSetupArgs: failed to allocate space for arguments\n");143 141 return -ENOMEM; 144 }145 142 146 143 IrqSaveFlags(flags); … … 394 391 395 392 if (err) 396 {397 KePrint("%s: failed to copy arguments\n",pathName);398 393 return err; 399 }400 394 401 395 err=ExecSetupFs(process, fds); … … 412 406 if (err) 413 407 { 414 KePrint("Failed to execute %s\n",pathName);415 416 408 /* Do resource cleanup */ 417 409 MmapProcessRemove(process); … … 441 433 if (!MMapDo(args->process, NULL, ARCH_STACK_TOP-(ARG_PAGES*PAGE_SIZE), ARG_PAGES*PAGE_SIZE, PAGE_RW | PAGE_PRESENT | PAGE_USER, 0, 442 434 MMAP_PRIVATE | MMAP_FIXED, NULL)) 443 {444 KePrint("ExecSetupArgs: failed to allocate stack\n");445 435 return -EFAULT; 446 }447 436 448 437 args->stackP=(DWORD*)ARCH_STACK_TOP; … … 623 612 if (!DoReadFile(&file,buffer,512)) 624 613 { 625 KePrint("Failed to read interpreter %s\n",pathName);626 614 err=-EIO; 627 615 goto headerFree; … … 632 620 if (ElfCheckHeader(header,ELF_EXEC | ELF_DYN)) 633 621 { 634 KePrint("%s is not a ELF interpreter\n",pathName);635 622 err=-EIO; 636 623 goto headerFree; … … 654 641 655 642 if (!(mapAddr=ElfMMap(process,file.vNode,physHeaders,&elfProt,mmapFlags))) 656 {657 KePrint("LoadElfInterp : Failed to memory map\n");658 643 return -ENOMEM; 659 }660 644 661 645 if (!loadAddr) … … 721 705 if (!DoReadFile(&args->exec, (BYTE*)buffer, 512)) 722 706 { 723 KePrint("Failed to read file %s\n", args->pathName);724 707 err=-EIO; 725 708 goto freeBuffer; … … 829 812 if (!DoReadFile(&args->exec, buffer, 512)) 830 813 { 831 KePrint("Failed to read file %s\n",args->pathName);832 814 err=-EIO; 833 815 goto freeBuffer; … … 838 820 if (ElfCheckHeader(header, ELF_EXEC | ELF_DYN)) 839 821 { 840 KePrint("%s: not a valid ELF executable\n", args->pathName);841 822 err=-EINVAL; 842 823 goto freeBuffer; … … 856 837 if (ElfLoadInterp(interpreter,&loadAddr,&interpAddr,process)) 857 838 { 858 KePrint("Invalid interpreter %s\n",interpreter);859 839 err=-EINVAL; 860 840 goto freeBuffer; … … 882 862 if (!ElfMMap(process, process->exec, physHeaders, &elfProt, MMAP_PRIVATE | MMAP_FIXED)) 883 863 { 884 KePrint("ExecElf : Failed to memory map\n");885 864 err=-ENOMEM; 886 865 goto freeBuffer;