Having virtual machine up, group name contains \ character after 
cgsnapshot output. lex.l does not consider this case. For example:
group machine.slice/machine-qemu\x2drhel6.4.scope {...}
Adding \ character into regexp for ID token resolves this problem.

Signed-off-by: Jan Chaloupka <jchal...@redhat.com>
---
  libcgroup-0.41/src/lex.l | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libcgroup-0.41/src/lex.l b/libcgroup-0.41/src/lex.l
index 1b357db..d7bf575 100644
--- a/libcgroup-0.41/src/lex.l
+++ b/libcgroup-0.41/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];}
  %%

------------------------------------------------------------------------------
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis & security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
_______________________________________________
Libcg-devel mailing list
Libcg-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libcg-devel

Reply via email to