From: Ivana Hutarova Varekova Date: Wed, 30 Oct 2013 13:26:42 +0000 (+0100) Subject: cgconfig.conf: enable sign "@" in cgroup name X-Git-Tag: v0.41~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5d1037b399cdc6f789d0f6e29b44000bd38f504a;p=thirdparty%2Flibcgroup.git cgconfig.conf: enable sign "@" in cgroup name This patch enables to have "@" sign in cgroup name in cgconfig.conf as well. It is because of systemd, which uses sign "@" to separate the template name from the instance identifier in its cgroup names. For example: systemd-fsck@.service. Without this patch, it's not possible to use these names in cgconfig.conf file. Signed-off-by: Ivana Hutarova Varekova Acked-by: Peter Schiffer --- diff --git a/src/lex.l b/src/lex.l index d41d9ed8..1b357dbf 100644 --- a/src/lex.l +++ b/src/lex.l @@ -43,7 +43,7 @@ jmp_buf parser_error_env; "namespace" {return NAMESPACE;} "template" {return TEMPLATE;} "default" {return DEFAULT;} -[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];} %%