diff options
author | Mateusz Guzik <mjg@FreeBSD.org> | 2022-03-03 12:45:11 +0000 |
---|---|---|
committer | Mateusz Guzik <mjg@FreeBSD.org> | 2022-03-03 17:21:58 +0000 |
commit | f3f3e3c44d3b1776653bbf19eab17ce006a815d8 (patch) | |
tree | 6e9ee13aff676e1e89dc7a9ea6ff72511caf326f /usr.bin/truss | |
parent | 33cbbf268f7d0f3daff0c2aa06836d932faf56a9 (diff) | |
download | src-f3f3e3c44d3b1776653bbf19eab17ce006a815d8.tar.gz src-f3f3e3c44d3b1776653bbf19eab17ce006a815d8.zip |
fd: add close_range(..., CLOSE_RANGE_CLOEXEC)
For compatibility with Linux.
MFC after: 3 days
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D34424
Diffstat (limited to 'usr.bin/truss')
-rw-r--r-- | usr.bin/truss/syscall.h | 1 | ||||
-rw-r--r-- | usr.bin/truss/syscalls.c | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/usr.bin/truss/syscall.h b/usr.bin/truss/syscall.h index 7a403d5b680d..53a1fd6ee8d7 100644 --- a/usr.bin/truss/syscall.h +++ b/usr.bin/truss/syscall.h @@ -91,6 +91,7 @@ enum Argtype { Atfd, Atflags, CapFcntlRights, + Closerangeflags, Extattrnamespace, Fadvice, Fcntl, diff --git a/usr.bin/truss/syscalls.c b/usr.bin/truss/syscalls.c index 586b583c3209..d611f3f73471 100644 --- a/usr.bin/truss/syscalls.c +++ b/usr.bin/truss/syscalls.c @@ -183,6 +183,8 @@ static const struct syscall_decode decoded_syscalls[] = { .args = { { Int, 0 } } }, { .name = "closefrom", .ret_type = 1, .nargs = 1, .args = { { Int, 0 } } }, + { .name = "close_range", .ret_type = 1, .nargs = 3, + .args = { { Int, 0 }, { Int, 1 }, { Closerangeflags, 2 } } }, { .name = "compat11.fstat", .ret_type = 1, .nargs = 2, .args = { { Int, 0 }, { Stat11 | OUT, 1 } } }, { .name = "compat11.fstatat", .ret_type = 1, .nargs = 4, @@ -1983,6 +1985,9 @@ print_arg(struct syscall_arg *sc, unsigned long *args, register_t *retval, case Fcntl: print_integer_arg(sysdecode_fcntl_cmd, fp, args[sc->offset]); break; + case Closerangeflags: + print_mask_arg(sysdecode_close_range_flags, fp, args[sc->offset]); + break; case Mprot: print_mask_arg(sysdecode_mmap_prot, fp, args[sc->offset]); break; |