Klemens Nanni <[email protected]> wrote:

> On Fri, May 22, 2020 at 05:57:37PM -0600, Theo de Raadt wrote:
> > There is an internal VCPU #define, but the keyword is vcpu, and there
> > appears to be nothing coming from the system which is an uppercase VCPU
> > 
> > We don't have pfctl spitting out messages like: invalid RDOMAIN, because
> > rdomain is the keyword, there is no reason to arbitrarily change things
> > from LOWERCASE to UPPERCASE or even CamelCase.
> Yes, although those error messages read fine to me with uppercase "VCPU"
> as well, regardless of whether the keyword is "vcpu" or "cpu", because
> they talk about the resources per se that are managed, not a particular
> line in the configuration file that is ill written.

That makes no sense.

> Fine with me either way.

Really? Then how about this?

Obvious DOMAIN refers to the resources, and so does MEMORY.  Obviously
these have nothing to do with the grammer.  Anyone will be able to
figure it out.  Right?

Index: config.c
===================================================================
RCS file: /cvs/src/usr.sbin/ldomctl/config.c,v
retrieving revision 1.38
diff -u -p -u -r1.38 config.c
--- config.c    22 May 2020 21:54:20 -0000      1.38
+++ config.c    22 May 2020 23:53:34 -0000
Index: parse.y
===================================================================
RCS file: /cvs/src/usr.sbin/ldomctl/parse.y,v
retrieving revision 1.18
diff -u -p -u -r1.18 parse.y
--- parse.y     21 Feb 2020 19:39:28 -0000      1.18
+++ parse.y     23 May 2020 00:26:30 -0000
@@ -123,7 +123,7 @@ domain              : DOMAIN STRING optnl '{' optnl 
                        struct domain *odomain;
                        SIMPLEQ_FOREACH(odomain, &conf->domain_list, entry)
                                if (strcmp(odomain->name, $2) == 0) {
-                                       yyerror("duplicate domain name: %s", 
$2);
+                                       yyerror("duplicate DOMAIN name: %s", 
$2);
                                        YYERROR;
                                }
                        domain = xzalloc(sizeof(struct domain));
@@ -141,7 +141,7 @@ domain              : DOMAIN STRING optnl '{' optnl 
                                        YYERROR;
                                }
                                if ( domain->memory == 0) {
-                                       yyerror("memory is required: %s",
+                                       yyerror("MEMORY is required: %s",
                                            domain->name);
                                        YYERROR;
                                }

Reply via email to