From: James M Leddy Date: Wed, 23 Feb 2011 15:39:42 +0000 (-0500) Subject: Allow commas for cpu sets in cgconfig.conf X-Git-Tag: v0.37.1~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ccf803b24e7ec80c9e1eee64d5936b3f26b08ec3;p=thirdparty%2Flibcgroup.git Allow commas for cpu sets in cgconfig.conf We set disjoint cpu sets with the following command: cgset -r cpuset.cpus=0,2 slot1 However, we don't allow commas that as part of the grammar when used in the configuration file at cgconfig.conf. This patch seeks to address that. Signed-off-by: James M Leddy Signed-off-by: Jan Safranek --- diff --git a/src/lex.l b/src/lex.l index a80327c1..d590e9fa 100644 --- a/src/lex.l +++ b/src/lex.l @@ -32,7 +32,7 @@ int line_no = 1; "perm" {return PERM;} "group" {return GROUP;} "namespace" {return NAMESPACE;} -[a-zA-Z0-9_\-\/\.]+ {yylval.name = strdup(yytext); return ID;} +[a-zA-Z0-9_\-\/\.\,]+ {yylval.name = strdup(yytext); return ID;} \"[^"]*\" {yylval.name = strdup(yytext+1); yylval.name[strlen(yylval.name)-1] = '\0'; return ID; } . {return yytext[0];} %%