From nobody Wed Jul 06 11:04:05 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 D68D81D00E5E; Wed, 6 Jul 2022 11:04:07 +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 4LdGrQ12rxz3NFm; Wed, 6 Jul 2022 11:04:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1657105446; 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=kN35MdKP/6quF9MJKYUHCNefxfetc8SQnh4LEAtdN+U=; b=M+mYYYODWWJ6dWbOPhfOjl3U6KEqf10LeSU6JKMjD/CZDZj3NQFoCSAYxf1zhfl0nOyOEr CiKdIviYGcLNeJfRaIhbTFPmYgpH2Ubq6SAVrxtm+6ns6jj2egD24u5urZdsioVWcB38DY UzUV3Ep0iZlWGDPWxUnSzPpTpRlPDeofSceNmf5OY9/6FG5JOxtrJGZWRP24E80UjAgXMB M05qbea35DAL/WXvte3wZv0og2WXcsgFpRJDNZAqjILcXI1kadAE+QGD51N7mHwzlJ0NLG BvfDiDZdHSS/gXvEF3tRaXYwI4uJgnWqD2//fob+eOob0x8aU1H4GRVMeYRkUA== 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 57030194BA; Wed, 6 Jul 2022 11:04:05 +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 266B45MM096526; Wed, 6 Jul 2022 11:04:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 266B45ak096525; Wed, 6 Jul 2022 11:04:05 GMT (envelope-from git) Date: Wed, 6 Jul 2022 11:04:05 GMT Message-Id: <202207061104.266B45ak096525@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dmitry Chagin Subject: git: e104ac1c34b9 - stable/13 - libsysdecode: Decode setitimer, getitimer which argument 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/stable/13 X-Git-Reftype: branch X-Git-Commit: e104ac1c34b9670fccd79b4e3e1b288eb3d3f305 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1657105446; 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=kN35MdKP/6quF9MJKYUHCNefxfetc8SQnh4LEAtdN+U=; b=SB5ELbdcl2nZwlBZveWkP7/egxGRdPH868yinM+wzSUdNRLVXbHL806QUfBM0V8Tgqeokt JrbuDptFDzZgM54VbI0cx262rjn9FP2L+Yo0ZD72yt6bfbD32WdJe8BQorQRy7k0GsZ1ji hkoNLhqjECuRQuWSDFcfu6+JXm3XEwWMNFIM5VurEYCHTq7xzNwMnA2vllOlwaSUYMbvPb TeKpzS61t1TmVSk211fStfKbQ6PKcvgJpoET1omOxbDplpYC99verOankb0R4UmDtFpmjw FBXDQZbuIjWNHDQ7V4U/kk2D6yiw0PY5rkagViY3F8ncQKQj/PURZPbZcA+4Rg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1657105446; a=rsa-sha256; cv=none; b=WchJrHdIwFkzSDnkomBdh/TBF8/4NEphZ2DEU0Sj/S/1yJTkdHVPaVijI28AVy+0loTGvK 1S3lH/HnB/XxCGcFhd7PrEKV4l3Vv4eGTI0MwLLtlDDfQ/wMbvNrgWohBwcunEY7Zx4UFD WHA6kECIqXi6kX2GnnsZUMqZbZPIv5N87Ga5UVIUhcfg6un9GufnIfcF2TPil+WTLIYf7w nFCdsmfjVQvcMxhCpUkvdDrd33NhV/dJo6xboPYOhP/ezaH4uHOVm0VBmSJ30SvgFBbf87 rmSo0w/fIu5KZC9WocZiYymSKTxOwLdBLd657kKaA0URCh9LV2cHuym2xjcSgg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=e104ac1c34b9670fccd79b4e3e1b288eb3d3f305 commit e104ac1c34b9670fccd79b4e3e1b288eb3d3f305 Author: Dmitry Chagin AuthorDate: 2022-06-22 11:17:10 +0000 Commit: Dmitry Chagin CommitDate: 2022-07-06 11:02:13 +0000 libsysdecode: Decode setitimer, getitimer which argument Reviewed by: jhb Differential revision: https://reviews.freebsd.org/D35230 MFC after: 2 weeks (cherry picked from commit 2fc3a51db14f2be7fd1f5515c6adfc60d4880207) --- 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 94e8e9faa697..4ad316c54f63 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 6c1b0bd2d226..f588319fbf17 100644 --- a/lib/libsysdecode/sysdecode.h +++ b/lib/libsysdecode/sysdecode.h @@ -68,6 +68,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