remove some compiler warnings
This commit is contained in:
parent
8c68eab859
commit
0709d365a1
2 changed files with 3 additions and 4 deletions
|
@ -212,7 +212,7 @@ static int initrd_open(fildes_t* file, const char* name)
|
|||
}
|
||||
|
||||
if (file->node->type == FS_DIRECTORY) {
|
||||
if (!file->flags & O_CREAT)
|
||||
if (!(file->flags & O_CREAT))
|
||||
return -ENOENT;
|
||||
|
||||
uint32_t i, j;
|
||||
|
|
|
@ -507,13 +507,12 @@ static int load_task(load_args_t* largs)
|
|||
elf_header_t header;
|
||||
elf_program_header_t prog_header;
|
||||
//elf_section_header_t sec_header;
|
||||
///!!! kfree is missing!
|
||||
///!!! kfree is missing!
|
||||
fildes_t *file = kmalloc(sizeof(fildes_t));
|
||||
file->offset = 0;
|
||||
file->flags = 0;
|
||||
|
||||
//TODO: init the hole fildes_t struct!
|
||||
vfs_node_t* node;
|
||||
task_t* curr_task = per_core(current_task);
|
||||
int err;
|
||||
|
||||
|
@ -524,7 +523,7 @@ static int load_task(load_args_t* largs)
|
|||
if (!file->node)
|
||||
return -EINVAL;
|
||||
|
||||
read_fs(file, (uint8_t*)&header, sizeof(elf_header_t));
|
||||
err = read_fs(file, (uint8_t*)&header, sizeof(elf_header_t));
|
||||
if (err < 0) {
|
||||
kprintf("read_fs failed: %d\n", err);
|
||||
return err;
|
||||
|
|
Loading…
Add table
Reference in a new issue