This patch adds possibility to specify parameters names in double quotes,
like:
devices {
devices.allow="c 1:3 mr";
}
The double quotes are not mandatory, old behavior is still there.
As side effect, also parameter names, group names, user names, controller names
etc. can be (optionally) in double quotes and can contain weird characters
- it's a feature, not a bug :). Of course, I could change the grammar to allow
double quotes only in param. values, that shouldn't be a problem.
There is also no advance handling of escape sequences - \", \n, \t does not work
here. That means that parameter values cannot contain newline or double quote
characters - are they required by any controllers?
Signed-off-by: Jan Safranek <jsafrane@redhat.com>
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
.TP
.B param value
Value, which should be written to the file when the control group is
-created.
+created. Optionally it can be enclosed in double quotes `"', it can
+contain spaces then.
.RE
.\"********************************************"
}
cpu {
.RS
-cpu.shares = 1000;
+cpu.shares = "1000";
.RE
}
.RE
}
cpu {
.RS
-cpu.shares = 500;
+cpu.shares = "500";
.RE
}
.RE
.RS
cpu {
.RS
-cpu.shares = 1000;
+cpu.shares = "1000";
.RE
}
.RE
.RS
cpu {
.RS
-cpu.shares = 500;
+cpu.shares = "500";
.RE
}
.RE
"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; }
. {return yytext[0];}
%%