Gentoo Archives: gentoo-commits

From: William Hubbs <williamh@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/openrc:openrc-0.11.x commit in: src/rc/
Date: Sun, 28 Oct 2012 21:43:52
Message-Id: 1351454561.f53645b7c728492a8d3e6bb7f2fe8bcbce92cf7d.WilliamH@OpenRC
1 commit: f53645b7c728492a8d3e6bb7f2fe8bcbce92cf7d
2 Author: William Hubbs <w.d.hubbs <AT> gmail <DOT> com>
3 AuthorDate: Wed Oct 24 17:29:29 2012 +0000
4 Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
5 CommitDate: Sun Oct 28 20:02:41 2012 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=f53645b7
7
8 mountinfo: respect the -q command line option
9
10 Previously, we were setting the quiet flag before the command line was
11 parsed. Since the flag is only used once, we can just read the
12 environment variable which is set by the parsing process.
13
14 Reported-by: <devurandom <AT> gmx.net>
15 X-Gentoo-Bug: 439010
16 X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=439010
17
18 ---
19 src/rc/mountinfo.c | 5 +----
20 1 files changed, 1 insertions(+), 4 deletions(-)
21
22 diff --git a/src/rc/mountinfo.c b/src/rc/mountinfo.c
23 index eaace13..43d9c83 100644
24 --- a/src/rc/mountinfo.c
25 +++ b/src/rc/mountinfo.c
26 @@ -390,11 +390,8 @@ mountinfo(int argc, char **argv)
27 char real_path[PATH_MAX + 1];
28 int opt;
29 int result;
30 - bool quiet;
31 char *this_path;
32
33 - quiet = rc_yesno(getenv("EINFO_QUIET"));
34 -
35 #define DO_REG(_var) \
36 if (_var) free(_var); \
37 _var = get_regex(optarg);
38 @@ -483,7 +480,7 @@ mountinfo(int argc, char **argv)
39 if (skip_point_regex &&
40 regexec(skip_point_regex, s->value, 0, NULL, 0) == 0)
41 continue;
42 - if (! quiet)
43 + if (! rc_yesno(getenv("EINFO_QUIET")))
44 printf("%s\n", s->value);
45 result = EXIT_SUCCESS;
46 }