Commit ec6c8a03 authored by Jonathan Marek's avatar Jonathan Marek Committed by Bjorn Andersson
Browse files

util: allow hexadecimal values for attr_as_unsigned (fix ufs provisioning)

dc61f8f7

 broke ufs provisioning by requiring base 10 for unsigned
attributes (provisioning xml have some values in hexadecimal). strtoul()
would return 0 for these values and provisioning would fail strangely.
Signed-off-by: default avatarJonathan Marek <jonathan@marek.ca>
parent 650b477c
......@@ -91,7 +91,7 @@ unsigned attr_as_unsigned(xmlNode *node, const char *attr, int *errors)
return 0;
}
return (unsigned int) strtoul((char*)value, NULL, 10);
return (unsigned int) strtoul((char*)value, NULL, 0);
}
const char *attr_as_string(xmlNode *node, const char *attr, int *errors)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment