Skip to content

Commit ec6c8a0

Browse files
fltoandersson
authored andcommitted
util: allow hexadecimal values for attr_as_unsigned (fix ufs provisioning)
dc61f8f 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 <[email protected]>
1 parent 650b477 commit ec6c8a0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

util.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ unsigned attr_as_unsigned(xmlNode *node, const char *attr, int *errors)
9191
return 0;
9292
}
9393

94-
return (unsigned int) strtoul((char*)value, NULL, 10);
94+
return (unsigned int) strtoul((char*)value, NULL, 0);
9595
}
9696

9797
const char *attr_as_string(xmlNode *node, const char *attr, int *errors)

0 commit comments

Comments
 (0)