diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2021-06-16 21:08:15 -0700 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2023-10-30 13:41:55 -0700 |
commit | d0b6b79323726e47b1e9e399870ab063883874d0 (patch) | |
tree | 8467a01d4a87688e1f65cd56756c4e5b10418cc3 /linux-user/flatload.c | |
parent | 86cf82dc9fa366d6758f4b1f9587c8d2f6062bad (diff) | |
download | qemu-d0b6b79323726e47b1e9e399870ab063883874d0.zip qemu-d0b6b79323726e47b1e9e399870ab063883874d0.tar.gz qemu-d0b6b79323726e47b1e9e399870ab063883874d0.tar.bz2 |
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>
Diffstat (limited to 'linux-user/flatload.c')
-rw-r--r-- | linux-user/flatload.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/linux-user/flatload.c b/linux-user/flatload.c index fdcc461..5b62aa0 100644 --- a/linux-user/flatload.c +++ b/linux-user/flatload.c @@ -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)); } |