]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
It might be useful to allow empty values in cgconfig.conf, like:
authorJan Safranek <jsafrane@redhat.com>
Tue, 7 Sep 2010 15:02:56 +0000 (20:32 +0530)
committerBalbir Singh <balbir@linux.vnet.ibm.com>
Tue, 7 Sep 2010 15:02:56 +0000 (20:32 +0530)
devices {
devices.deny = "";
}

I know, it sounds weird, but Ivana is preparing cgsnapshot tool, which
saves current cgroups into a cgconfig.conf file, and empty values might
occur there.

Signed-off-by: Jan Safranek <jsafrane@redhat.com>
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
src/lex.l

index fdd2f2e13ef0ff03c02fefd2ce8b2d74282dbf7a..a80327c1388d19e0d9b6e2b4b9d0b9585347427e 100644 (file)
--- a/src/lex.l
+++ b/src/lex.l
@@ -33,7 +33,7 @@ int line_no = 1;
 "group"                {return GROUP;}
 "namespace"    {return NAMESPACE;}
 [a-zA-Z0-9_\-\/\.]+ {yylval.name = strdup(yytext); return ID;}
-\"[^"]+\" {yylval.name = strdup(yytext+1); yylval.name[strlen(yylval.name)-1] = '\0'; return ID; }
+\"[^"]*\" {yylval.name = strdup(yytext+1); yylval.name[strlen(yylval.name)-1] = '\0'; return ID; }
 .      {return yytext[0];}
 %%