]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lsblk: permit option --exclude more than once
authorBernhard Voelker <mail@bernhard-voelker.de>
Fri, 15 Jun 2012 13:40:35 +0000 (15:40 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 19 Jun 2012 09:06:48 +0000 (11:06 +0200)
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

index 24fb44f6de3a477749d52f5184fca002d921d721..bd5e6b7822ef61405de4b69c104671fceb188e8b 100644 (file)
@@ -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;