util-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bernhard Voelker <mail@bernhard-voelker.de>
To: "util-linux@vger.kernel.org" <util-linux@vger.kernel.org>
Subject: [PATCH] lsblk: permit option --exclude more than once
Date: Fri, 15 Jun 2012 15:42:12 +0200	[thread overview]
Message-ID: <4FDB3BB4.8060509@bernhard-voelker.de> (raw)


>From 03746408a33cfc393370caabbe8da1bdfef5f484 Mon Sep 17 00:00:00 2001
From: Bernhard Voelker <mail@bernhard-voelker.de>
Date: Fri, 15 Jun 2012 15:40:35 +0200
Subject: [PATCH] lsblk: permit option --exclude more than once

Previously, `lsblk -e 8 -e 11` did not exlude maj:8 as requested.

Signed-off-by: Bernhard Voelker <mail@bernhard-voelker.de>
---
 misc-utils/lsblk.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/misc-utils/lsblk.c b/misc-utils/lsblk.c
index 24fb44f..bd5e6b7 100644
--- a/misc-utils/lsblk.c
+++ b/misc-utils/lsblk.c
@@ -153,8 +153,8 @@ struct lsblk *lsblk;	/* global handler */
 int columns[NCOLS];/* enabled columns */
 int ncolumns;		/* number of enabled columns */

-int excludes[256];
-size_t nexcludes;
+static int excludes[256];
+static size_t nexcludes;

 static struct libmnt_table *mtab, *swaps;
 static struct libmnt_cache *mntcache;
@@ -1080,8 +1080,6 @@ leave:

 static void parse_excludes(const char *str)
 {
-	nexcludes = 0;
-
 	while (str && *str) {
 		char *end = NULL;
 		unsigned long n;
-- 
1.7.7



             reply	other threads:[~2012-06-15 13:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-15 13:42 Bernhard Voelker [this message]
2012-06-19  9:07 ` [PATCH] lsblk: permit option --exclude more than once Karel Zak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4FDB3BB4.8060509@bernhard-voelker.de \
    --to=mail@bernhard-voelker.de \
    --cc=util-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).