From owner-svn-src-all@FreeBSD.ORG Tue Nov 22 21:39:55 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 399701065670; Tue, 22 Nov 2011 21:39:55 +0000 (UTC) (envelope-from to.my.trociny@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 623AD8FC0C; Tue, 22 Nov 2011 21:39:53 +0000 (UTC) Received: by bkbzs8 with SMTP id zs8so1006379bkb.13 for ; Tue, 22 Nov 2011 13:39:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:references:x-comment-to:sender:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=ek2DHv+PSjIvW8Ey/UW+jrlWkhxTVwoSELz4a/MnS84=; b=oGqQBoQdLSuaWqOTmtzGyFAmoD5xFLwP5FHNJHMI7nmPK6GQ3ERsd1Zje364fztTDf 1GWjKRsfzDHI1tJXKIVTzAJMohRkxDRPTvy07b0zlxYeIq3wWn8P2DV/jY1+AjnfaIlr tweA5jJlegPaO5jh1pF95mqIBOGABcwaEDq+w= Received: by 10.204.148.67 with SMTP id o3mr21303625bkv.130.1321997993061; Tue, 22 Nov 2011 13:39:53 -0800 (PST) Received: from localhost ([95.69.173.122]) by mx.google.com with ESMTPS id e20sm19951607fab.2.2011.11.22.13.39.50 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 22 Nov 2011 13:39:51 -0800 (PST) From: Mikolaj Golub To: Alexander Best References: <201111222114.pAMLEkuU010011@svn.freebsd.org> <20111122212413.GA44084@freebsd.org> X-Comment-To: Alexander Best Sender: Mikolaj Golub Date: Tue, 22 Nov 2011 23:39:49 +0200 In-Reply-To: <20111122212413.GA44084@freebsd.org> (Alexander Best's message of "Tue, 22 Nov 2011 21:24:13 +0000") Message-ID: <86fwhfrg4a.fsf@kopusha.home.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r227840 - head/bin/ps X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Nov 2011 21:39:55 -0000 On Tue, 22 Nov 2011 21:24:13 +0000 Alexander Best wrote: AB> On Tue Nov 22 11, Mikolaj Golub wrote: >> Author: trociny >> Date: Tue Nov 22 21:14:46 2011 >> New Revision: 227840 >> URL: http://svn.freebsd.org/changeset/base/227840 >> >> Log: >> No need in procfs(5). >> >> MFC after: 2 weeks >> >> Modified: >> head/bin/ps/ps.1 >> head/bin/ps/ps.c >> >> Modified: head/bin/ps/ps.1 >> ============================================================================== >> --- head/bin/ps/ps.1 Tue Nov 22 21:12:28 2011 (r227839) >> +++ head/bin/ps/ps.1 Tue Nov 22 21:14:46 2011 (r227840) >> @@ -29,7 +29,7 @@ >> .\" @(#)ps.1 8.3 (Berkeley) 4/18/94 >> .\" $FreeBSD$ >> .\" >> -.Dd October 30, 2011 >> +.Dd November 22, 2011 >> .Dt PS 1 >> .Os >> .Sh NAME >> @@ -686,9 +686,6 @@ attempts to automatically determine the >> .Bl -tag -width ".Pa /boot/kernel/kernel" -compact >> .It Pa /boot/kernel/kernel >> default system namelist >> -.It Pa /proc >> -the mount point of >> -.Xr procfs 5 AB> are these references to procfs still necessary in the ps(1) man page? AB> 1) AB> " AB> The process file system (see procfs(5)) should be mounted when ps is exe- AB> cuted, otherwise not all information will be available. AB> " Thanks, I will remove this. AB> and 2) AB> " AB> SEE ALSO AB> kill(1), pgrep(1), pkill(1), procstat(1), w(1), kvm(3), strftime(3), AB> mac(4), procfs(5), pstat(8), sysctl(8), mutex(9) AB> " AB> ? I think this reference to procfs(5) should remain. It is here as yet another way to get process statistics. >> .El >> .Sh SEE ALSO >> .Xr kill 1 , >> >> Modified: head/bin/ps/ps.c >> ============================================================================== >> --- head/bin/ps/ps.c Tue Nov 22 21:12:28 2011 (r227839) >> +++ head/bin/ps/ps.c Tue Nov 22 21:14:46 2011 (r227840) >> @@ -130,7 +130,6 @@ struct listinfo { >> } l; >> }; >> >> -static int check_procfs(void); >> static int addelem_gid(struct listinfo *, const char *); >> static int addelem_pid(struct listinfo *, const char *); >> static int addelem_tty(struct listinfo *, const char *); >> @@ -411,14 +410,6 @@ main(int argc, char *argv[]) >> argv += optind; >> >> /* >> - * If the user specified ps -e then they want a copy of the process >> - * environment kvm_getenvv(3) attempts to open /proc//mem. >> - * Check to make sure that procfs is mounted on /proc, otherwise >> - * print a warning informing the user that output will be incomplete. >> - */ >> - if (needenv == 1 && check_procfs() == 0) >> - warnx("Process environment requires procfs(5)"); >> - /* >> * If there arguments after processing all the options, attempt >> * to treat them as a list of process ids. >> */ >> @@ -1360,18 +1351,6 @@ kludge_oldps_options(const char *optlist >> return (newopts); >> } >> >> -static int >> -check_procfs(void) >> -{ >> - struct statfs mnt; >> - >> - if (statfs("/proc", &mnt) < 0) >> - return (0); >> - if (strcmp(mnt.f_fstypename, "procfs") != 0) >> - return (0); >> - return (1); >> -} >> - >> static void >> usage(void) >> { -- Mikolaj Golub