[dpdk-dev] [PATCH v2 6/6] cfgfile: add support for empty value string
Dumitrescu, Cristian
cristian.dumitrescu at intel.com
Mon Mar 27 12:54:37 CEST 2017
> -----Original Message-----
> From: Allain Legacy [mailto:allain.legacy at windriver.com]
> Sent: Thursday, March 9, 2017 1:11 PM
> To: Richardson, Bruce <bruce.richardson at intel.com>; Dumitrescu, Cristian
> <cristian.dumitrescu at intel.com>
> Cc: yuanhan.liu at linux.intel.com; dev at dpdk.org
> Subject: [PATCH v2 6/6] cfgfile: add support for empty value string
>
> This commit adds support to the cfgfile library for parsing a key=value
> line that has no value string specified (e.g., "key="). This can be used
> to override a configuration attribute that has a default value or default
> list of values to set it back to an undefined value to disable
> functionality.
>
IMO allowing empty string key values is confusing and should not be allowed.
I think there are better alternatives for setting a key to its default value:
key = default
key = DEFAULT
key = <the specific default value>
Any reason not to use these approaches?
More information about the dev
mailing list