From nobody Wed Jun 22 11:41:08 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 48AD9871C51; Wed, 22 Jun 2022 11:41:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LShKd11Fnz4sNG; Wed, 22 Jun 2022 11:41:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1655898069; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pilzavdPM94K7bxNIAiyFk/srLOVMpwwYJsxj20U+Ts=; b=GAZiTcpfzF3iR6TPf+/PhUxXVgdBROoSJhc45TQNouGbK3gteMdoTjd4D1sYFO23nRUk3I 2ASJDIyE0mIcevkZ6G1cAlNJtKCXYz6Al6cTcfzyiYKsamxL49xDby7Nh7b0bzuNAeVkXY 9wOMN+hk6gbNnZ+tWAb9hBcMI2VF5ttSgAyvQqwV+Q1u5tUe6c64e0lWnCk8Or+h85an0k 1of48Ja6uIfqH1Us4/iZZyWeuI4Eguw3tSvewwWpC9FiI0WRu+ZTzQHrR89vqm7gdbkb7N XqrPg4eE9tU7V19OIXybdGQd/jVtp8sXLgcOqM+PkhcIBUq2d4H7iXZaamX7jA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E33212571E; Wed, 22 Jun 2022 11:41:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 25MBf8tN023861; Wed, 22 Jun 2022 11:41:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 25MBf8VE023860; Wed, 22 Jun 2022 11:41:08 GMT (envelope-from git) Date: Wed, 22 Jun 2022 11:41:08 GMT Message-Id: <202206221141.25MBf8VE023860@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: d2b3237eebdf - main - libsysdecode: Decode Linux *at() flags List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d2b3237eebdfd46d54a9539acf13e3f24dc935b2 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1655898069; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pilzavdPM94K7bxNIAiyFk/srLOVMpwwYJsxj20U+Ts=; b=ulEwCvNKNPyfvKruZvMWGXFwyD4VrMv+B6VwO4cg0pRkQOkfk3mssBJdp1kCf1loaJGkRZ mvPIUaEL2F3i/Bi+TwByVbgtBsVox+T/oCUG6WMComOkRzxCjt7DkTrI6Di40kmPKzdu2I CGNVN0jy7E0wBgfdUicP/uDDeB/EXX7jH7B/cfjqSFtQMPzW7uflPk8c9DZ00ShfCRd65t nWV0ncljqW9Tg7d2/s40G3C1A92/sqFqbWDXzAy1eVBDtAlk0xZlFLidcrezjiFBXozFW0 HfLBlVN/ql5w8sOdddf1kCTOZqvJGMYPX3HomWco69uG8yLby9rWvrpy9JOWdg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1655898069; a=rsa-sha256; cv=none; b=w6MogZ+6AT2iL9xjAp/JZTiDdIgGs3JWUfH017HaFyXJGR0a/Ayc/9xWpZPQdl4AAdu198 xYW/enpoOuaY++djDn2tEMMWjxNfrwTUskBPaip85TAObkxTmjgfmcHlyWKoLGMkO41nBV uXomXnDv9/56qC1Q1ICIJ1D4rpMq8nRV7ZPOGKGQnI+S2TPJYbe2zZ/OsyOgDt3iYf+xCQ t+uwCj45UwOR1vtVWXOry+0QYjT3mNnA3BQVzd5j/jXhqsxDEbNUmrQu4BBt++PL45P6Ws rlJI8wS8k1R/yHUnJo3+9wV3/ATydiHyJMW2V2eZRMjALHI4cPxPgMlmLgpOfg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=d2b3237eebdfd46d54a9539acf13e3f24dc935b2 commit d2b3237eebdfd46d54a9539acf13e3f24dc935b2 Author: Dmitry Chagin AuthorDate: 2022-06-22 11:25:36 +0000 Commit: Dmitry Chagin CommitDate: 2022-06-22 11:25:36 +0000 libsysdecode: Decode Linux *at() flags MFC after: 2 weeks --- 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 +#include #include #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 4a826f489a16..7b1a77aad9af 100644 --- a/lib/libsysdecode/sysdecode.h +++ b/lib/libsysdecode/sysdecode.h @@ -139,6 +139,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);