linux-user: Add strace support for printing arguments of chown()/lchown()
commit5844f4bc4111248b9de0c2efa422cafcdaa69cf1
authorFilip Bozuta <Filip.Bozuta@syrmia.com>
Fri, 19 Jun 2020 12:33:30 +0000 (19 14:33 +0200)
committerLaurent Vivier <laurent@vivier.eu>
Mon, 29 Jun 2020 11:08:48 +0000 (29 13:08 +0200)
treebe74b18e9ddf4b0700a5e80307d003afc602e400
parentaf861deaed5aa979522ec72425913295dc050f10
linux-user: Add strace support for printing arguments of chown()/lchown()

This patch implements strace argument printing functionality for syscalls:

    *chown, lchown - change ownership of a file

        int chown(const char *pathname, uid_t owner, gid_t group)
        int lchown(const char *pathname, uid_t owner, gid_t group)
        man page: https://www.man7.org/linux/man-pages/man2/lchown.2.html

Implementation notes:

    Both syscalls use strings as arguments and thus a separate
    printing function was stated in "strace.list" for them.
    Both syscalls share the same number and types of arguments
    and thus share a same definition in file "syscall.c".
    This defintion uses existing functions "print_string()" to
    print the string argument and "print_raw_param()" to print
    other two arguments that are of basic types.

Signed-off-by: Filip Bozuta <Filip.Bozuta@syrmia.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20200619123331.17387-6-filip.bozuta@syrmia.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
linux-user/strace.c
linux-user/strace.list