Skip to contentSkip to conversation

Fix segfault when using -U, -G and -M options in dmsetup

PATCH New Peter Rajnoha 2 participants 2 messages Apr 24, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix segfault when using -U, -G and -M options in dmsetup

It seems nobody uses these options :) Permissions will be covered by udev anyway...

We have to define ":" in getopt for options that require parameters.

Peter

tools/dmsetup.c +1 -1
index 0d6a371..1194c5f 100644
@@ -2565,7 +2565,7 @@ static int _process_switches(int *argc, char ***argv, const char *dev_dir)
 
 	optarg = 0;
 	optind = OPTIND_INIT;
-	while ((ind = -1, c = GETOPTLONG_FN(*argc, *argv, "cCfGj:m:Mno:O:ru:Uv",
+	while ((ind = -1, c = GETOPTLONG_FN(*argc, *argv, "cCfG:j:m:M:no:O:ru:U:v",
 					    long_options, NULL)) != -1) {
 		if (c == ':' || c == '?')
 			return 0;
#1 lore raw

PATCH 1/1 Fix segfault when using -U, -G and -M options in dmsetup

Quoted 1 line · Peter Rajnoha

We have to define ":" in getopt for options that require parameters.

Ack.

Alasdair

Signature · 1 line
agk at redhat.com