]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
Allow commas for cpu sets in cgconfig.conf
authorJames M Leddy <james.leddy@redhat.com>
Wed, 23 Feb 2011 15:39:42 +0000 (10:39 -0500)
committerJan Safranek <jsafrane@redhat.com>
Thu, 24 Feb 2011 08:55:27 +0000 (09:55 +0100)
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 <james.leddy@redhat.com>
Signed-off-by: Jan Safranek <jsafrane@redhat.com>
src/lex.l

index a80327c1388d19e0d9b6e2b4b9d0b9585347427e..d590e9fad8f99b734d92b299d8c54ffacc69336e 100644 (file)
--- 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];}
 %%