[ovs-dev] [tests+nxm-ofctl 04/42] Make installation directories overridable at runtime.

Ben Pfaff blp at nicira.com
Mon Nov 29 20:26:51 UTC 2010


On Wed, Nov 24, 2010 at 05:13:11PM -0800, Justin Pettit wrote:
> On Nov 23, 2010, at 2:43 PM, Ben Pfaff wrote:
> 
> > --- /dev/null
> > +++ b/lib/dirs.c.in
> > @@ -0,0 +1,66 @@
> > +#line 2 "@srcdir@/lib/dirs.c.in"
> 
> What does that "#line 2" line do?

"#line <number> <name>" is a standard C preprocessor directive that says
"the following actually came from line number <number> in the file named
<file>".  If there's an error or warning, then the compiler reports that
file and line instead of the file and line actually being read.  In this
case, we want error messages to talk about dirs.c.in instead of the
generated dirs.c, so that developers edit the right file, and so this
directive will cause that to happen.  The line number is 2 because the
next source line in dirs.c corresponds to line 2 in dirs.c.in.

> > +struct directory {
> > +    const char *value;          /* Actual value or NULL if not known yet. */
> 
> This is really minor, but would you mind changing this to "not yet
> determined" from "not known yet"?  Based on the comment, I was
> thinking this value was thinking that the value may not be knowable at
> this point.

Done.

> > +    const char *default_value;  /* Default value. */
> > +    const char *var_name;       /* Environment variable to override default. */
> > +};
> 
> Otherwise, this looks good.

OK, thanks.




More information about the dev mailing list