Skip to contentSkip to conversation

lsblk: permit option --exclude more than once

PATCH Applied Bernhard Voelker 2 participants 2 messages Jun 15, 2012 – Jun 19, 2012 Util-Linux package

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lsblk: permit option --exclude more than once

Quoted 2 lines

From 03746408a33cfc393370caabbe8da1bdfef5f484 Mon Sep 17 00:00:00 2001

From: Bernhard Voelker <[email protected]>
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.

---
 misc-utils/lsblk.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
misc-utils/lsblk.c +2 -4
index 24fb44f..bd5e6b7 100644
@@ -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;
Signature · 1 line
1.7.7
maintainer Applied
#1 lore raw
Quoted 2 lines · Bernhard Voelker
 misc-utils/lsblk.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

Applied, thanks.

Signature · 2 lines
 Karel Zak  <[email protected]>
 http://karelzak.blogspot.com