Bug 90553 - Default value must be numeric?
Default value must be numeric?
Status: CLOSED NOTABUG
Product: eCos
Classification: Retired
Component: CDL (Show other bugs)
CVS
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bart Veer
Bart Veer
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-05-09 11:56 EDT by Gary Thomas
Modified: 2007-04-18 12:53 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-05-09 14:06:58 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Gary Thomas 2003-05-09 11:56:19 EDT
Description of problem:
I have a component of type data with legal values { "860" "860P" ...}
I can set the default value to "860", but not "860P"
Selecting "860P" (or forcing it via other CDL) works fine.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Try to change the default value in
hal/powerpc/mpc8xx/current/cdl/hal_powerpc_mpc8xx.cdl
2.
3.
    
Actual results:


Expected results:


Additional info:
Comment 1 Bart Veer 2003-05-09 13:59:34 EDT
Exactly what failure is seen?

If you use default_value "860P" then the parser will get confused. The quotes
are removed by the Tcl interpreter so libcdl sees 860P, tries to parse it as a
number,
and fails. You should get a parse error about an invalid character after the
number 860.

If you use default_value { "860P" } then everything seems to work. The libcdl
parser will still see the quotes so it will treat the contents as a string
rather than a number.
Comment 2 Gary Thomas 2003-05-09 14:06:58 EDT
The error I get does indicate a parsing problem.

/work/develop/ecos/packages/hal/powerpc/mpc8xx/current/cdl/hal_powerpc_mpc8xxx.cdl,
component CYGHWR_HAL_POWERPC_MPC8XX, property default_value: error
    Invalid character detected after number 860
     ^4^ {860P...}
Package CYGPKG_HAL_POWERPC_MPC8xx, 1 error occurred while reading in the CDL data.

Using { "860P" } does seem sufficient, I'll just do that and be happy.

Note You need to log in before you can comment on or make changes to this bug.