Skip to content
Snippets Groups Projects
  • Paul Brook's avatar
    33f53ac5
    linux-user: Fix inotify on aarch64 · 33f53ac5
    Paul Brook authored
    
    The inotify implementation originally called the raw host syscalls.
    Commit 3b3f24ad changed this to use the glibc wrappers. However ifdefs
    in syscall.c still test for presence of the raw syscalls.
    
    This causes a problem on e.g. aarch64 hosts which never had the
    inotify_init syscall - it had been obsoleted by inotify_init1 before
    aarch64 was invented! However it does have a perfectly good glibc
    implementation of inotify_wait.
    
    Fix this by removing all the raw __NR_inotify_* tests, and instead check
    CONFIG_INOTIFY, which already tests for the glibc functionality we use.
    
    Also remove the now-pointless sys_inotify* wrappers.
    
    Tested using x86-64 inotifywatch on aarch64 host, and vice-versa
    
    Signed-off-by: default avatarPaul Brook <paul@nowt.org>
    Reviewed-by: default avatarLaurent Vivier <laurent@vivier.eu>
    Message-Id: <20220126202636.655289-1-paul@nowt.org>
    Signed-off-by: default avatarLaurent Vivier <laurent@vivier.eu>
    33f53ac5
    History
    linux-user: Fix inotify on aarch64
    Paul Brook authored
    
    The inotify implementation originally called the raw host syscalls.
    Commit 3b3f24ad changed this to use the glibc wrappers. However ifdefs
    in syscall.c still test for presence of the raw syscalls.
    
    This causes a problem on e.g. aarch64 hosts which never had the
    inotify_init syscall - it had been obsoleted by inotify_init1 before
    aarch64 was invented! However it does have a perfectly good glibc
    implementation of inotify_wait.
    
    Fix this by removing all the raw __NR_inotify_* tests, and instead check
    CONFIG_INOTIFY, which already tests for the glibc functionality we use.
    
    Also remove the now-pointless sys_inotify* wrappers.
    
    Tested using x86-64 inotifywatch on aarch64 host, and vice-versa
    
    Signed-off-by: default avatarPaul Brook <paul@nowt.org>
    Reviewed-by: default avatarLaurent Vivier <laurent@vivier.eu>
    Message-Id: <20220126202636.655289-1-paul@nowt.org>
    Signed-off-by: default avatarLaurent Vivier <laurent@vivier.eu>