mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
linux-user: Replace bprm->fd with bprm->src.fd
There are only a couple of uses of bprm->fd remaining. Migrate to the other field. Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
86cf82dc9f
commit
d0b6b79323
3 changed files with 6 additions and 8 deletions
|
@ -463,7 +463,7 @@ static int load_flat_file(struct linux_binprm * bprm,
|
|||
DBG_FLT("BINFMT_FLAT: ROM mapping of file (we hope)\n");
|
||||
|
||||
textpos = target_mmap(0, text_len, PROT_READ|PROT_EXEC,
|
||||
MAP_PRIVATE, bprm->fd, 0);
|
||||
MAP_PRIVATE, bprm->src.fd, 0);
|
||||
if (textpos == -1) {
|
||||
fprintf(stderr, "Unable to mmap process text\n");
|
||||
return -1;
|
||||
|
@ -490,7 +490,7 @@ static int load_flat_file(struct linux_binprm * bprm,
|
|||
} else
|
||||
#endif
|
||||
{
|
||||
result = target_pread(bprm->fd, datapos,
|
||||
result = target_pread(bprm->src.fd, datapos,
|
||||
data_len + (relocs * sizeof(abi_ulong)),
|
||||
fpos);
|
||||
}
|
||||
|
@ -540,10 +540,10 @@ static int load_flat_file(struct linux_binprm * bprm,
|
|||
else
|
||||
#endif
|
||||
{
|
||||
result = target_pread(bprm->fd, textpos,
|
||||
result = target_pread(bprm->src.fd, textpos,
|
||||
text_len, 0);
|
||||
if (result >= 0) {
|
||||
result = target_pread(bprm->fd, datapos,
|
||||
result = target_pread(bprm->src.fd, datapos,
|
||||
data_len + (relocs * sizeof(abi_ulong)),
|
||||
ntohl(hdr->data_start));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue