[ofw] RE: ndinstall patch

Sean Hefty sean.hefty at intel.com
Thu Jul 16 14:40:36 PDT 2009


>>+	printf("\t\t<blank> use the default ND provider '%s'\n",
>>ND_DEFAULT_PROVIDER);
>
>ND_DEFAULT_PROVIDER would become provider_name[index]

Hmm... I take that back.  This needs to be provider_name[0].  index could change
before detecting an error parsing the command line that results in showing the
usage.

Of course, this leads us to wanting to define some constant so we can still
change the default provider in a single location...  something like this would
work:

#define DEFAULT_INDEX IBAL_INDEX

static int index = DEFAULT_INDEX;

which you can argue whether or not that's better than the original patch...  My
previous comments were based on being able to eliminate the #define, versus
replacing it.  The index view matches up a little better with the other #define
INDEX values, I guess.

- Sean




More information about the ofw mailing list