Changeset ce04ea44 in mainline for uspace/app/taskdump/elf_core.c
- Timestamp:
- 2017-04-02T12:27:14Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- d4067a7
- Parents:
- 163fc09
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/taskdump/elf_core.c
r163fc09 rce04ea44 207 207 } 208 208 209 rc = write(fd, &pos, &elf_hdr, sizeof(elf_hdr));209 rc = vfs_write(fd, &pos, &elf_hdr, sizeof(elf_hdr)); 210 210 if (rc != sizeof(elf_hdr)) { 211 211 printf("Failed writing ELF header.\n"); … … 215 215 216 216 for (i = 0; i < n_ph; ++i) { 217 rc = write(fd, &pos, &p_hdr[i], sizeof(p_hdr[i]));217 rc = vfs_write(fd, &pos, &p_hdr[i], sizeof(p_hdr[i])); 218 218 if (rc != sizeof(p_hdr[i])) { 219 219 printf("Failed writing program header.\n"); … … 232 232 note.type = NT_PRSTATUS; 233 233 234 rc = write(fd, &pos, ¬e, sizeof(elf_note_t));234 rc = vfs_write(fd, &pos, ¬e, sizeof(elf_note_t)); 235 235 if (rc != sizeof(elf_note_t)) { 236 236 printf("Failed writing note header.\n"); … … 239 239 } 240 240 241 rc = write(fd, &pos, "CORE", note.namesz);241 rc = vfs_write(fd, &pos, "CORE", note.namesz); 242 242 if (rc != (ssize_t) note.namesz) { 243 243 printf("Failed writing note header.\n"); … … 248 248 pos = ALIGN_UP(pos, word_size); 249 249 250 rc = write(fd, &pos, &pr_status, sizeof(elf_prstatus_t));250 rc = vfs_write(fd, &pos, &pr_status, sizeof(elf_prstatus_t)); 251 251 if (rc != sizeof(elf_prstatus_t)) { 252 252 printf("Failed writing register data.\n"); … … 310 310 } 311 311 312 rc = write(fd, pos, buffer, to_copy);312 rc = vfs_write(fd, pos, buffer, to_copy); 313 313 if (rc != (ssize_t) to_copy) { 314 314 printf("Failed writing memory contents.\n");
Note:
See TracChangeset
for help on using the changeset viewer.