Changeset 705 for soft/giet_vm/giet_kernel
- Timestamp:
- Aug 24, 2015, 5:08:30 PM (10 years ago)
- File:
- 
          - 1 edited
 
 - 
          soft/giet_vm/giet_kernel/ctx_handler.c (modified) (3 diffs)
 
Legend:
- Unmodified
- Added
- Removed
- 
        soft/giet_vm/giet_kernel/ctx_handler.cr702 r705 127 127 128 128 // load Elf-Header into buffer from .elf file 129 if ( _fat_lseek( fd, 0, SEEK_SET ) ) return 1;130 if ( _fat_read( fd, buf, 4096 ) ) return 1;129 if ( _fat_lseek( fd, 0, SEEK_SET ) < 0 ) return 1; 130 if ( _fat_read( fd, buf, 4096 ) < 0 ) return 1; 131 131 132 132 #if GIET_DEBUG_SWITCH … … 141 141 unsigned int nsegments = elf_header_ptr->e_phnum; 142 142 143 // load Program-Header-Table from .elf file 144 if ( _fat_lseek( fd, offset, SEEK_SET ) ) return 1;145 if ( _fat_read( fd, buf, 4096 ) ) return 1;143 // load Program-Header-Table from .elf file 144 if ( _fat_lseek( fd, offset, SEEK_SET ) < 0 ) return 1; 145 if ( _fat_read( fd, buf, 4096 ) < 0 ) return 1; 146 146 147 147 #if GIET_DEBUG_SWITCH … … 167 167 168 168 // load the segment 169 if ( _fat_lseek( fd, seg_offset, SEEK_SET ) ) return 1;170 if ( _fat_read( fd, (void*)seg_vaddr, seg_size ) ) return 1;169 if ( _fat_lseek( fd, seg_offset, SEEK_SET ) < 0 ) return 1; 170 if ( _fat_read( fd, (void*)seg_vaddr, seg_size ) < 0 ) return 1; 171 171 172 172 #if GIET_DEBUG_SWITCH 
Note: See TracChangeset
          for help on using the changeset viewer.
      ![(please configure the [header_logo] section in trac.ini)](/trac/giet-vm/chrome/site/your_project_logo.png)
