Remove debug messages
This commit is contained in:
parent
f63237939b
commit
9dde61b9df
@ -92,11 +92,9 @@ char load_proc(size_t datapos,char* initrd) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
char load_proc_devfs(size_t datapos) {
|
char load_proc_devfs(size_t datapos) {
|
||||||
serial_print("load_proc_devfs\n");
|
|
||||||
FILE* initrd=fopen("/dev/initrd","r");
|
FILE* initrd=fopen("/dev/initrd","r");
|
||||||
elf_header header;
|
elf_header header;
|
||||||
fseek(initrd,datapos,SEEK_SET);
|
fseek(initrd,datapos,SEEK_SET);
|
||||||
serial_print("HERE1\n");
|
|
||||||
fread(&header,sizeof(elf_header),1,initrd);
|
fread(&header,sizeof(elf_header),1,initrd);
|
||||||
if (header.magic!=ELF_MAGIC) {
|
if (header.magic!=ELF_MAGIC) {
|
||||||
serial_print("Bad magic number (");
|
serial_print("Bad magic number (");
|
||||||
@ -106,17 +104,11 @@ char load_proc_devfs(size_t datapos) {
|
|||||||
serial_print(")\n");
|
serial_print(")\n");
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
serial_print("HERE2\n");
|
|
||||||
void* address_space=new_address_space();
|
void* address_space=new_address_space();
|
||||||
for (int i=0;i<header.pheader_ent_nm;i++) {
|
for (int i=0;i<header.pheader_ent_nm;i++) {
|
||||||
elf_pheader pheader;
|
elf_pheader pheader;
|
||||||
fseek(initrd,(header.prog_hdr)+(header.pheader_ent_sz*i)+datapos,SEEK_SET);
|
fseek(initrd,(header.prog_hdr)+(header.pheader_ent_sz*i)+datapos,SEEK_SET);
|
||||||
fread(&pheader,sizeof(elf_pheader),1,initrd);
|
fread(&pheader,sizeof(elf_pheader),1,initrd);
|
||||||
serial_print("pheader.memsz=");
|
|
||||||
char str[256];
|
|
||||||
hex_to_ascii(pheader.memsz,str);
|
|
||||||
serial_print(str);
|
|
||||||
serial_print("\n");
|
|
||||||
char* ptr=alloc_memory(((pheader.memsz)/4096)+1);
|
char* ptr=alloc_memory(((pheader.memsz)/4096)+1);
|
||||||
memset(ptr,0,pheader.memsz);
|
memset(ptr,0,pheader.memsz);
|
||||||
if (pheader.filesz>0) {
|
if (pheader.filesz>0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user