From owner-svn-src-head@freebsd.org Thu Mar 29 00:12:51 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 83466F57D27; Thu, 29 Mar 2018 00:12:51 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3564B6B196; Thu, 29 Mar 2018 00:12:51 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 30262122BC; Thu, 29 Mar 2018 00:12:51 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2T0CpsK096433; Thu, 29 Mar 2018 00:12:51 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2T0CpA4096432; Thu, 29 Mar 2018 00:12:51 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201803290012.w2T0CpA4096432@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 29 Mar 2018 00:12:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331716 - head/usr.bin/truss X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/usr.bin/truss X-SVN-Commit-Revision: 331716 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Mar 2018 00:12:51 -0000 Author: jhb Date: Thu Mar 29 00:12:50 2018 New Revision: 331716 URL: https://svnweb.freebsd.org/changeset/base/331716 Log: Reformat the enum of syscall argument types. List enum values on separate lines to minimize diffs as new types are added. Split the enum values up into groups and use some simple sorting within groups (scalar enums are sorted by size, then base, all other groups are generally sorted alphabetically). No functional change. Modified: head/usr.bin/truss/syscall.h Modified: head/usr.bin/truss/syscall.h ============================================================================== --- head/usr.bin/truss/syscall.h Thu Mar 29 00:04:07 2018 (r331715) +++ head/usr.bin/truss/syscall.h Thu Mar 29 00:12:50 2018 (r331716) @@ -69,31 +69,143 @@ * IN (meaning that the data is passed *into* the system call). */ -enum Argtype { None = 1, Hex, Octal, Int, UInt, LongHex, Name, Ptr, Stat, Stat11, Ioctl, - Quad, Signal, Sockaddr, StringArray, Timespec, Timeval, Itimerval, - Pollfd, Fd_set, Sigaction, Fcntl, Mprot, Mmapflags, Whence, Readlinkres, - Sigset, Sigprocmask, StatFs, Kevent, Sockdomain, Socktype, Open, - Fcntlflag, Rusage, RusageWho, BinString, Shutdown, Resource, Rlimit, - Timeval2, Pathconf, Rforkflags, ExitStatus, Waitoptions, Idtype, Procctl, - LinuxSockArgs, Umtxop, Atfd, Atflags, Timespec2, Accessmode, Long, - Sysarch, ExecArgs, ExecEnv, PipeFds, QuadHex, Utrace, IntArray, Pipe2, - CapFcntlRights, Fadvice, FileFlags, Flockop, Getfsstatmode, Kldsymcmd, - Kldunloadflags, Sizet, Madvice, Socklent, Sockprotocol, Sockoptlevel, - Sockoptname, Msgflags, CapRights, PUInt, PQuadHex, Acltype, - Extattrnamespace, Minherit, Mlockall, Mountflags, Msync, Priowhich, - Ptraceop, Quotactlcmd, Reboothowto, Rtpriofunc, Schedpolicy, Schedparam, - PSig, Siginfo, Kevent11, Iovec, Sctpsndrcvinfo, Msghdr, +enum Argtype { + None = 1, - CloudABIAdvice, CloudABIClockID, CloudABIFDSFlags, - CloudABIFDStat, CloudABIFileStat, CloudABIFileType, - CloudABIFSFlags, CloudABILookup, CloudABIMFlags, CloudABIMProt, - CloudABIMSFlags, CloudABIOFlags, CloudABISDFlags, - CloudABISignal, CloudABISockStat, CloudABISSFlags, - CloudABITimestamp, CloudABIULFlags, CloudABIWhence }; + /* Scalar integers. */ + Socklent, + Octal, + Int, + UInt, + Hex, + Long, + LongHex, + Sizet, + Quad, + QuadHex, + /* Encoded scalar values. */ + Accessmode, + Acltype, + Atfd, + Atflags, + CapFcntlRights, + Extattrnamespace, + Fadvice, + Fcntl, + Fcntlflag, + FileFlags, + Flockop, + Getfsstatmode, + Idtype, + Ioctl, + Kldsymcmd, + Kldunloadflags, + Madvice, + Minherit, + Msgflags, + Mlockall, + Mmapflags, + Mountflags, + Mprot, + Msync, + Open, + Pathconf, + Pipe2, + Procctl, + Priowhich, + Ptraceop, + Quotactlcmd, + Reboothowto, + Resource, + Rforkflags, + Rtpriofunc, + RusageWho, + Schedpolicy, + Shutdown, + Signal, + Sigprocmask, + Sockdomain, + Sockoptlevel, + Sockoptname, + Sockprotocol, + Socktype, + Sysarch, + Umtxop, + Waitoptions, + Whence, + + /* Pointers to non-structures. */ + Ptr, + BinString, + CapRights, + ExecArgs, + ExecEnv, + ExitStatus, + Fd_set, + IntArray, + Iovec, + Name, + PipeFds, + PSig, + PQuadHex, + PUInt, + Readlinkres, + StringArray, + + /* Pointers to structures. */ + Itimerval, + Kevent, + Kevent11, + LinuxSockArgs, + Msghdr, + Pollfd, + Rlimit, + Rusage, + Schedparam, + Sctpsndrcvinfo, + Sigaction, + Siginfo, + Sigset, + Sockaddr, + Stat, + Stat11, + StatFs, + Timespec, + Timespec2, + Timeval, + Timeval2, + Utrace, + + CloudABIAdvice, + CloudABIClockID, + CloudABIFDSFlags, + CloudABIFDStat, + CloudABIFileStat, + CloudABIFileType, + CloudABIFSFlags, + CloudABILookup, + CloudABIMFlags, + CloudABIMProt, + CloudABIMSFlags, + CloudABIOFlags, + CloudABISDFlags, + CloudABISignal, + CloudABISockStat, + CloudABISSFlags, + CloudABITimestamp, + CloudABIULFlags, + CloudABIWhence, + + MAX_ARG_TYPE, +}; + #define ARG_MASK 0xff #define OUT 0x100 #define IN /*0x20*/0 + +_Static_assert(ARG_MASK > MAX_ARG_TYPE, + "ARG_MASK overlaps with Argtype values"); struct syscall_args { enum Argtype type;