diff mbox

[dmraid,1/4] Parse "-cc" as required by man page.

Message ID 20091217054515.427662058@suse.de (mailing list archive)
State New, archived
Headers show

Commit Message

NeilBrown Dec. 17, 2009, 5:44 a.m. UTC
None
diff mbox

Patch

--- dmraid.orig/tools/commands.c
+++ dmraid/tools/commands.c
@@ -142,10 +142,18 @@  check_identifiers(struct lib_context *lc
 		const char delim = *OPT_STR_SEPARATOR(lc);
 		char *p = optarg;
 
-		p = remove_white_space(lc, p, strlen(p));
-		p = collapse_delimiter(lc, p, strlen(p), delim);
-		if (!lc_strcat_opt(lc, o, p, delim))
-			return 0;
+		if (o == LC_COLUMN) {
+			while (p && *p == 'c') {
+				lc_inc_opt(lc, o);
+				p++;
+			}
+		}
+		if (p && *p) {
+			p = remove_white_space(lc, p, strlen(p));
+			p = collapse_delimiter(lc, p, strlen(p), delim);
+			if (!lc_strcat_opt(lc, o, p, delim))
+				return 0;
+		}
 	}
 
 	lc_inc_opt(lc, o);