From ec6c8a034e54070a5c1c36e8d2ea08b22443ff4e Mon Sep 17 00:00:00 2001 From: Jonathan Marek Date: Sat, 27 Feb 2021 12:17:19 -0500 Subject: [PATCH] util: allow hexadecimal values for attr_as_unsigned (fix ufs provisioning) dc61f8f79e924 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 --- util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util.c b/util.c index 3a297e8..4583418 100644 --- a/util.c +++ b/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)