From owner-svn-src-head@freebsd.org Mon Nov 13 07:38:20 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 98015D7C614; Mon, 13 Nov 2017 07:38:20 +0000 (UTC) (envelope-from agapon@gmail.com) Received: from mail-lf0-f65.google.com (mail-lf0-f65.google.com [209.85.215.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 26CE3644EE; Mon, 13 Nov 2017 07:38:19 +0000 (UTC) (envelope-from agapon@gmail.com) Received: by mail-lf0-f65.google.com with SMTP id a132so17194581lfa.7; Sun, 12 Nov 2017 23:38:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=rJLsQ/u9Iw/R2Byfi6hsqdrcQHifVu9/q6vLcoazFTI=; b=AXx2utHziUDbxPC29/CO6Rp++0wtcNOA87zUcbfDLygE0FvhusUj0YbnpE0z2+032F Y1lOwdMcpCZNA2/zRvlIcQpPrIxyyBo8Z5YMPEZJwrcsDt0rb+9JyqrZzrt+S4VcSI83 eq5xWAMUNLAtsE/bgX3fXu7cQ29riGanyoHfpREQbRsBO4bcWpAq3qsHBVNfN+M2RN+8 x07VSavrsqWfAwrchMWnHTe2a5tJxE+abbwEM19wZq5djCOl1wtCwPRFGLqKZGmT8O2j CotSMOfKUQnqnFpLtYsGrJYhsthnMSzmveUVZ7HaHoocOVjOoy1ymDuwYm9MwYVgyWdY fNMA== X-Gm-Message-State: AJaThX6ZlWq9W8y73ifZPC9ArtC5KJTwGJOy32ZxzQMtY2XfrVFFPwWB UyOtxXNUnXvohH48JM1ni9Q= X-Google-Smtp-Source: AGs4zMZhEneD5XExb+j0PcESHj1b7R/FYdSLdX6zvcroxVUKv+qSCCXDajaXMwlCu6yp1eJG+1rD9g== X-Received: by 10.46.25.216 with SMTP id 85mr1932560ljz.145.1510558692230; Sun, 12 Nov 2017 23:38:12 -0800 (PST) Received: from [192.168.0.88] (east.meadow.volia.net. [93.72.151.96]) by smtp.googlemail.com with ESMTPSA id r26sm1388006lfd.15.2017.11.12.23.38.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 12 Nov 2017 23:38:11 -0800 (PST) Subject: Re: svn commit: r324619 - in head/usr.bin/procstat: . tests To: Brooks Davis Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, kdrakehp@zoho.com References: <201710141838.v9EIcaOQ047300@repo.freebsd.org> <81c30f82-268e-ce59-4326-5a2f14ca62e5@FreeBSD.org> <20171113020016.GF76223@spindle.one-eyed-alien.net> From: Andriy Gapon Message-ID: <65f847b0-b730-ee35-ca74-2a77cecde9a3@FreeBSD.org> Date: Mon, 13 Nov 2017 09:38:09 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171113020016.GF76223@spindle.one-eyed-alien.net> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit 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: Mon, 13 Nov 2017 07:38:20 -0000 On 13/11/2017 04:00, Brooks Davis wrote: > On Sun, Nov 12, 2017 at 12:15:35PM +0200, Andriy Gapon wrote: >> On 14/10/2017 21:38, Brooks Davis wrote: >>> Author: brooks >>> Date: Sat Oct 14 18:38:36 2017 >>> New Revision: 324619 >>> URL: https://svnweb.freebsd.org/changeset/base/324619 >>> >>> Log: >>> Switch procstat from subcommand flags to verbs >>> >>> - Use an enumerated value instead of separate flags for commands >>> - Look for a verb if no command flag is set >>> - Lookup the "xocontainer" value based on the command >>> - Document the new command verbs in the man-page >>> >>> Submitted by: kdrakehp@zoho.com >>> Differential Revision: https://reviews.freebsd.org/D10916 >> >> What's the new way of doing procstat -kk -a ? >> >> procstat -kk -a now crashes because cmd is NULL when 'k' option is processed. >> procstat kstack and procstat kstack -v just produce the usage message without >> telling any specific usage error. >> procstat kstack -a says that 'a' is an illegal option. > > From the reading the manpage it should be: procstat -a kstack -v This works, thank you. > The crash is a regression. Please file a bugreport. This one line patch seems to fix the crash and procstat -kk -a is usable again. Does it look okay to you? --- a/usr.bin/procstat/procstat.c +++ b/usr.bin/procstat/procstat.c @@ -296,7 +296,7 @@ main(int argc, char *argv[]) cmd = getcmd("tsignals"); break; case 'k': - if (cmd->cmd == procstat_kstack) { + if (cmd != NULL && cmd->cmd == procstat_kstack) { if ((procstat_opts & PS_OPT_VERBOSE) != 0) usage(); procstat_opts |= PS_OPT_VERBOSE; -- Andriy Gapon