From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id C9A9F138010 for ; Wed, 24 Oct 2012 17:38:58 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1BE84E0507; Wed, 24 Oct 2012 17:38:36 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 9AEF1E0507 for ; Wed, 24 Oct 2012 17:38:35 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id D202E33D8CF for ; Wed, 24 Oct 2012 17:38:34 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 694DAE5436 for ; Wed, 24 Oct 2012 17:38:33 +0000 (UTC) From: "William Hubbs" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "William Hubbs" Message-ID: <1351099769.978dbe028414fc44603d3be70f2a4b226eda9916.WilliamH@OpenRC> Subject: [gentoo-commits] proj/openrc:master commit in: src/rc/ X-VCS-Repository: proj/openrc X-VCS-Files: src/rc/mountinfo.c X-VCS-Directories: src/rc/ X-VCS-Committer: WilliamH X-VCS-Committer-Name: William Hubbs X-VCS-Revision: 978dbe028414fc44603d3be70f2a4b226eda9916 X-VCS-Branch: master Date: Wed, 24 Oct 2012 17:38:33 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 07dbf895-460c-4653-8179-7f96eb6ae711 X-Archives-Hash: c4318d4abd13aa32ea51eb82f747cc0a commit: 978dbe028414fc44603d3be70f2a4b226eda9916 Author: William Hubbs gmail com> AuthorDate: Wed Oct 24 17:29:29 2012 +0000 Commit: William Hubbs gentoo org> CommitDate: Wed Oct 24 17:29:29 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=978dbe02 mountinfo: respect the -q command line option Previously, we were setting the quiet flag before the command line was parsed. Since the flag is only used once, we can just read the environment variable which is set by the parsing process. Reported-by: gmx.net> X-Gentoo-Bug: 439010 X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=439010 --- src/rc/mountinfo.c | 5 +---- 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/src/rc/mountinfo.c b/src/rc/mountinfo.c index eaace13..43d9c83 100644 --- a/src/rc/mountinfo.c +++ b/src/rc/mountinfo.c @@ -390,11 +390,8 @@ mountinfo(int argc, char **argv) char real_path[PATH_MAX + 1]; int opt; int result; - bool quiet; char *this_path; - quiet = rc_yesno(getenv("EINFO_QUIET")); - #define DO_REG(_var) \ if (_var) free(_var); \ _var = get_regex(optarg); @@ -483,7 +480,7 @@ mountinfo(int argc, char **argv) if (skip_point_regex && regexec(skip_point_regex, s->value, 0, NULL, 0) == 0) continue; - if (! quiet) + if (! rc_yesno(getenv("EINFO_QUIET"))) printf("%s\n", s->value); result = EXIT_SUCCESS; }