mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-01 14:53:54 -06:00
alpha-linux-user: Fix brk error return.
Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
This commit is contained in:
parent
7868652357
commit
7dd46c02e4
1 changed files with 10 additions and 2 deletions
|
@ -718,9 +718,17 @@ abi_long do_brk(abi_ulong new_brk)
|
|||
PROT_READ|PROT_WRITE,
|
||||
MAP_ANON|MAP_FIXED|MAP_PRIVATE, 0, 0));
|
||||
|
||||
if (!is_error(mapped_addr))
|
||||
#if defined(TARGET_ALPHA)
|
||||
/* We (partially) emulate OSF/1 on Alpha, which requires we
|
||||
return a proper errno, not an unchanged brk value. */
|
||||
if (is_error(mapped_addr)) {
|
||||
return -TARGET_ENOMEM;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!is_error(mapped_addr)) {
|
||||
target_brk = new_brk;
|
||||
|
||||
}
|
||||
return target_brk;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue