]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
cgconfig.conf: enable sign "@" in cgroup name
authorIvana Hutarova Varekova <varekova@redhat.com>
Wed, 30 Oct 2013 13:26:42 +0000 (14:26 +0100)
committerIvana Hutarova Varekova <varekova@redhat.com>
Wed, 30 Oct 2013 13:26:42 +0000 (14:26 +0100)
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 <varekova@redhat.com>
Acked-by: Peter Schiffer <pschiffe@redhat.com>
src/lex.l

index d41d9ed8f83b5bff9d652d7da343a9b8923cacdf..1b357dbfaf5c81fec3b60084d2aa2c79e3484abb 100644 (file)
--- 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];}
 %%