From nobody Wed Jun 22 11:41:04 2022 X-Original-To: dev-commits-src-main@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 63C878718C8; Wed, 22 Jun 2022 11:41:05 +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 4LShKX4wmvz4scM; Wed, 22 Jun 2022 11:41:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1655898064; 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=2ioNROoADR7IeoRBCsTAaWj1lhg9vSK1LfG9qvDZyZo=; b=Jc8M5H6SKwkAlqxhhUCu0nEzZyUoBcNsCm38Zm7D2+t2bdyD6Z5Sb0QG2678SKkT2N7YGu sEALxWaVrD8oitxx4W+5sS0IcFZLVQuJpXZ2J8H81wFzX2HX/8f7BLSN1S1/PBPblIW6qE ux0LYY37tlvdMkT1UT8OQ24orjW76HM2Zl1XxOeQbd0Z7Us3XrEaHF/dDca9MLwBlmTzQ9 DWggt8QIfwLgajypmfcYnPXuVg+JN11VAm+RYwUUbmP2kz1BqIfzqdlIV06MjZAhO/Jfsv 7XYMefDSe4H/qs9jDK5kTq82K7xbkU8aQM+kMGpjJwvoMBdcc7ktnKnJygkmEQ== 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 66289256B2; Wed, 22 Jun 2022 11:41:04 +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 25MBf4IW023762; Wed, 22 Jun 2022 11:41:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 25MBf44d023761; Wed, 22 Jun 2022 11:41:04 GMT (envelope-from git) Date: Wed, 22 Jun 2022 11:41:04 GMT Message-Id: <202206221141.25MBf44d023761@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: 2fc3a51db14f - main - libsysdecode: Decode setitimer, getitimer which argument List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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: 2fc3a51db14f2be7fd1f5515c6adfc60d4880207 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1655898064; 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=2ioNROoADR7IeoRBCsTAaWj1lhg9vSK1LfG9qvDZyZo=; b=HxmYv0c+uvtAFhZVUjKEYU5GCLKO4YK8PRgXX6bSSWSyNi4vi/+R5Xw7BeHrwboDAHHB5Y kS+s8ayAb022hB9aLczWHrUlYyFG56emwHn1wW+XKR+ZSSu2BiPqe1zEMhkj55LXWUqasv aiEs6kDayBSJkm5JEyahJ3B2MGQykji62cb6qBRokekb6FWJnQkN1nHaKAGjdAAr/tKcBc heYsS+xvIUDpBoxDqfeoTz0jYK+mUJaKU6Z0bBhuUREqDSheqlK7R/XP2r8rjC75gyKKCU YBWPzYG7kGxzL5ARcGYo+bLKYyLNHZnIf69cTNvzf1v6N2KEIbmJEVxvriGPeA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1655898064; a=rsa-sha256; cv=none; b=m9mz1DjzMTBtkJSNPk1owedfhqQLER6oKujAeQ+3DE8rajfi1oJQhcEts+6VtXrQY3ut+P h9qLiRFzFhlcBCewE/djNBfcSQy4JDatXPaCvjKx1BJmKxH5UEzcco1bGVcyDGM739Nivv i6O0zH76yr3zbczS0q/qsJiyR5qeIffqPybDBx6aNrI7SSo79Y7adhWZNrkI15i0ijpGlq 5hvsMSXHEjI476rn0EwPYGYFF3YxqqpcdlDQAdvPLKfXFhJ1bWUJFIZ07DhbyqEEsEcmXE Ts3W+HCYZu3090DRRnFH/G8lOelc+BDiJ0mhqN/loObWWxqTyuM4nD489GvfIQ== 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=2fc3a51db14f2be7fd1f5515c6adfc60d4880207 commit 2fc3a51db14f2be7fd1f5515c6adfc60d4880207 Author: Dmitry Chagin AuthorDate: 2022-06-22 11:17:10 +0000 Commit: Dmitry Chagin CommitDate: 2022-06-22 11:17:10 +0000 libsysdecode: Decode setitimer, getitimer which argument Reviewed by: jhb Differential revision: https://reviews.freebsd.org/D35230 MFC after: 2 weeks --- lib/libsysdecode/flags.c | 7 +++++++ lib/libsysdecode/mktables | 1 + lib/libsysdecode/sysdecode.h | 1 + lib/libsysdecode/sysdecode_enum.3 | 9 ++++++++- 4 files changed, 17 insertions(+), 1 deletion(-) diff --git a/lib/libsysdecode/flags.c b/lib/libsysdecode/flags.c index c89c0ab75302..ac109cc454e0 100644 --- a/lib/libsysdecode/flags.c +++ b/lib/libsysdecode/flags.c @@ -1195,3 +1195,10 @@ sysdecode_shmflags(FILE *fp, int flags, int *rem) return (print_mask_0(fp, shmflags, flags, rem)); } + +const char * +sysdecode_itimer(int which) +{ + + return (lookup_value(itimerwhich, which)); +} diff --git a/lib/libsysdecode/mktables b/lib/libsysdecode/mktables index 6bac6ff93b8d..d61ae02205fe 100644 --- a/lib/libsysdecode/mktables +++ b/lib/libsysdecode/mktables @@ -168,6 +168,7 @@ else gen_table "sysarchnum" "[A-Z_]+[[:space:]]+[0-9]+" "machine/sysarch.h" fi gen_table "shmflags" "SHM_[A-Z_]+[[:space:]]+0x[0-9]+" "sys/mman.h" "SHM_ANON" +gen_table "itimerwhich" "ITIMER_[A-Z]+[[:space:]]+[0-9]+" "sys/time.h" # Generate a .depend file for our output file if [ -n "$output_file" ]; then diff --git a/lib/libsysdecode/sysdecode.h b/lib/libsysdecode/sysdecode.h index e386ae0466a9..91b07e0b4768 100644 --- a/lib/libsysdecode/sysdecode.h +++ b/lib/libsysdecode/sysdecode.h @@ -66,6 +66,7 @@ const char *sysdecode_ioctlname(unsigned long _val); const char *sysdecode_ipproto(int _protocol); void sysdecode_kevent_fflags(FILE *_fp, short _filter, int _fflags, int _base); +const char *sysdecode_itimer(int _which); const char *sysdecode_kevent_filter(int _filter); bool sysdecode_kevent_flags(FILE *_fp, int _flags, int *_rem); const char *sysdecode_kldsym_cmd(int _cmd); diff --git a/lib/libsysdecode/sysdecode_enum.3 b/lib/libsysdecode/sysdecode_enum.3 index 2ea021b9933c..04137cd6e841 100644 --- a/lib/libsysdecode/sysdecode_enum.3 +++ b/lib/libsysdecode/sysdecode_enum.3 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 14, 2018 +.Dd June 22, 2022 .Dt sysdecode_enum 3 .Os .Sh NAME @@ -38,6 +38,7 @@ .Nm sysdecode_getrusage_who , .Nm sysdecode_idtype , .Nm sysdecode_ipproto , +.Nm sysdecode_itimer , .Nm sysdecode_kldsym_cmd , .Nm sysdecode_kldunload_flags , .Nm sysdecode_lio_listio_mode , @@ -97,6 +98,8 @@ .Ft const char * .Fn sysdecode_ipproto "int protocol" .Ft const char * +.Fn sysdecode_itimer "int which" +.Ft const char * .Fn sysdecode_kldsym_cmd "int cmd" .Ft const char * .Fn sysdecode_kldunload_flags "int flags" @@ -186,6 +189,10 @@ Most of these functions decode an argument passed to a system call: .Xr procctl 2 , .Xr waitid 2 .Ta Fa idtype +.It Fn sysdecode_itimer Ta +.Xr getitimer 2 , +.Xr setitimer 2 +.Ta Fa which .It Fn sysdecode_kldsym_cmd Ta Xr kldsym 2 Ta Fa cmd .It Fn sysdecode_kldunload_flags Ta Xr kldunloadf 2 Ta Fa flags .It Fn sysdecode_lio_listio_mode Ta Xr lio_listio 2 Ta Fa mode