This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: When default_value in CDL?
- From: Bart Veer <bartv at ecoscentric dot com>
- To: andrew at lunn dot ch
- Cc: ecos-discuss at ecos dot sourceware dot org
- Date: Wed, 7 Apr 2004 13:57:01 +0100 (BST)
- Subject: Re: [ECOS] When default_value in CDL?
- References: <20040406191257.GI22060@lunn.ch>
>>>>> "Andrew" == Andrew Lunn <andrew@lunn.ch> writes:
Andrew> Hi Bart
Andrew> I was looking at some CDL and noticed an option did not
Andrew> have a default_value statement. The code seems to assume
Andrew> if no default_value statement is given, the value will
Andrew> automagically be zero. Is this true for CDL? I had a very
Andrew> quick look at the documentation but could not find
Andrew> anything which stated this.
It is true. From
http://ecos.sourceware.org/docs-latest/cdl-guide/ref.default-value.html
"A cdl_option or other entity can have at most one default_value
property, and it is illegal to have both a calculated and a
default_value property in one body. If an option does not have
either a default_value or a calculated property and it does not have
the flavor none then the configuration tools will assume a default
value expression of 0."
My personal preference is to always specify the default_value
explicitly. However at the time the language was specified other team
members wanted a sensible default default value, to reduce CDL script
verbosity. I cannot think of any reason for changing the current
behaviour, so those existing CDL scripts are safe.
Bart
--
Bart Veer eCos Configuration Architect
http://www.ecoscentric.com/ The eCos and RedBoot experts
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss