mirror of
https://github.com/linux-msm/qdl.git
synced 2026-02-25 13:12:25 -08:00
util: allow hexadecimal values for attr_as_unsigned (fix ufs provisioning)
dc61f8f79e 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: Jonathan Marek <jonathan@marek.ca>
This commit is contained in:
committed by
Bjorn Andersson
parent
650b477ca5
commit
ec6c8a034e
2
util.c
2
util.c
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user