Thread (72 messages) 72 messages, 6 authors, 2017-04-04

Re: [PATCH v2 6/6] cfgfile: add support for empty value string

From: Dumitrescu, Cristian <hidden>
Date: 2017-03-27 11:24:42

-----Original Message-----
From: Legacy, Allain [mailto:Allain.Legacy@windriver.com]
Sent: Monday, March 27, 2017 12:13 PM
To: Dumitrescu, Cristian <redacted>; Richardson, Bruce
[off-list ref]
Cc: yuanhan.liu@linux.intel.com; dev@dpdk.org
Subject: RE: [PATCH v2 6/6] cfgfile: add support for empty value string

We have a legacy file format that we need to support.   Other parts of our
system are able to handle a "key=" entry in the file so we are trying to gain
parity with those parsers.

Allain


Allain Legacy, Software Developer
direct 613.270.2279  fax 613.492.7870 skype allain.legacy

OK, for legacy reasons I am OK to allow this feature, but please let's have the user explicitly ask for it by providing a specific flag for it in the flags argument of the load/load_with_params functions.
quoted
-----Original Message-----
From: Dumitrescu, Cristian [mailto:cristian.dumitrescu@intel.com]
Sent: Monday, March 27, 2017 6:55 AM
To: Legacy, Allain; RICHARDSON, BRUCE
Cc: yuanhan.liu@linux.intel.com; dev@dpdk.org
Subject: RE: [PATCH v2 6/6] cfgfile: add support for empty value string


quoted
-----Original Message-----
From: Allain Legacy [mailto:allain.legacy@windriver.com]
Sent: Thursday, March 9, 2017 1:11 PM
To: Richardson, Bruce <redacted>; Dumitrescu,
Cristian [off-list ref]
Cc: yuanhan.liu@linux.intel.com; dev@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.
quoted
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?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help