From: Bernhard Voelker Date: Fri, 15 Jun 2012 13:40:35 +0000 (+0200) Subject: lsblk: permit option --exclude more than once X-Git-Tag: v2.22-rc1~270 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f6da50d49bdd187534672ef002192787455044f0;p=thirdparty%2Futil-linux.git 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 --- diff --git a/misc-utils/lsblk.c b/misc-utils/lsblk.c index 24fb44f6de..bd5e6b7822 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;