• A
    linux-user: Use getcwd syscall directly · 0f6bb195
    Andreas Schwab 提交于
    The glibc getcwd function returns different errors than the getcwd
    syscall, which triggers an assertion failure in the glibc getcwd function
    when running under the emulation.
    
    When the syscall returns ENAMETOOLONG, the glibc wrapper uses a fallback
    implementation that potentially handles an unlimited path length, and
    returns with ERANGE if the provided buffer is too small.  The qemu
    emulation cannot distinguish the two cases, and thus always returns ERANGE.
    This is unexpected by the glibc wrapper.
    Signed-off-by: NAndreas Schwab <schwab@suse.de>
    Reviewed-by: NLaurent Vivier <laurent@vivier.eu>
    Message-Id: <mvmmu3qplvi.fsf@suse.de>
    [lv: updated description]
    Signed-off-by: NLaurent Vivier <laurent@vivier.eu>
    0f6bb195
syscall.c 401.6 KB