git: 46ebfcb039c6 - stable/13 - libsysdecode: Decode Linux *at() flags
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 06 Jul 2022 11:04:09 UTC
The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=46ebfcb039c6842d50da3cd1ba7695761c91497c commit 46ebfcb039c6842d50da3cd1ba7695761c91497c Author: Dmitry Chagin <dchagin@FreeBSD.org> AuthorDate: 2022-06-22 11:25:36 +0000 Commit: Dmitry Chagin <dchagin@FreeBSD.org> CommitDate: 2022-07-06 11:02:14 +0000 libsysdecode: Decode Linux *at() flags MFC after: 2 weeks (cherry picked from commit d2b3237eebdfd46d54a9539acf13e3f24dc935b2) --- lib/libsysdecode/linux.c | 8 ++++++++ lib/libsysdecode/mklinuxtables | 1 + lib/libsysdecode/sysdecode.h | 1 + 3 files changed, 10 insertions(+) diff --git a/lib/libsysdecode/linux.c b/lib/libsysdecode/linux.c index 79e71d1207ca..8a3b88a7bfca 100644 --- a/lib/libsysdecode/linux.c +++ b/lib/libsysdecode/linux.c @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); #endif #include <compat/linux/linux.h> +#include <compat/linux/linux_file.h> #include <compat/linux/linux_timer.h> #define X(a,b) { a, #b }, @@ -197,3 +198,10 @@ sysdecode_linux_clock_flags(FILE *fp, int flags, int *rem) return (print_mask_int(fp, clockflags, flags, rem)); } + +bool +sysdecode_linux_atflags(FILE *fp, int flag, int *rem) +{ + + return (print_mask_int(fp, atflags, flag, rem)); +} diff --git a/lib/libsysdecode/mklinuxtables b/lib/libsysdecode/mklinuxtables index caeeb785b4d3..734d69fca9cf 100644 --- a/lib/libsysdecode/mklinuxtables +++ b/lib/libsysdecode/mklinuxtables @@ -88,6 +88,7 @@ cat <<_EOF_ _EOF_ +gen_table "atflags" "LINUX_AT_[A-Z_]+[[:space:]]+[0-9]+" "compat/linux/linux_file.h" gen_table "clockids" "LINUX_CLOCK_[A-Z_]+[[:space:]]+[0-9]+" "compat/linux/linux_timer.h" gen_table "clockflags" "LINUX_TIMER_[A-Z_]+[[:space:]]+0x[0-9]+" "compat/linux/linux_timer.h" gen_table "clockcpuids" "LINUX_CPUCLOCK_[A-Z_]+[[:space:]]+[0-9]+" "compat/linux/linux_timer.h" "_MASK|_MAX" diff --git a/lib/libsysdecode/sysdecode.h b/lib/libsysdecode/sysdecode.h index 6d72a84ef32a..ae09077e969e 100644 --- a/lib/libsysdecode/sysdecode.h +++ b/lib/libsysdecode/sysdecode.h @@ -141,6 +141,7 @@ bool sysdecode_shmflags(FILE *_fp, int _flags, int *_rem); #define SYSDECODE_HAVE_LINUX +bool sysdecode_linux_atflags(FILE *_fp, int _flag, int *_rem); void sysdecode_linux_clockid(FILE *_fp, clockid_t _which); bool sysdecode_linux_clock_flags(FILE *_fp, int _flags, int *_rem); const char *sysdecode_linux_signal(int _sig);