summaryrefslogtreecommitdiff
path: root/lib/strto.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2024-11-13 08:14:29 -0600
committerTom Rini <trini@konsulko.com>2024-11-13 08:14:29 -0600
commit9d49c73862c4c492b81b8cdd941fc4d602774673 (patch)
treec0e441278c859d2e65ebf46844714ff58349fc8f /lib/strto.c
parentb30787ad24d51ea7efb75870a83f2c3e6cad0f24 (diff)
parent37587d2e1454e9642bbae900b920dc5f0530fa87 (diff)
Merge patch series "lib: uuid: fix uuid_str_to_le_bin() on 32-bit"
Heinrich Schuchardt <heinrich.schuchardt@canonical.com> says: The lib_test_uuid_to_le and lib lib_test_dynamic_uuid tests fail on 32-bit systems. But we never caught this in our CI because we never ran any of our C unit tests on 32-bit. Enable CONFIG_UNIT_TEST on qemu_arm_defconfig. hextoul() cannot convert a string to a 64-bit number on a 32-bit system. Use the new function hextoull() instead. Link: https://lore.kernel.org/r/20241103224223.195255-1-heinrich.schuchardt@canonical.com
Diffstat (limited to 'lib/strto.c')
-rw-r--r--lib/strto.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/strto.c b/lib/strto.c
index f83ac67c666..206d1e91847 100644
--- a/lib/strto.c
+++ b/lib/strto.c
@@ -78,6 +78,11 @@ ulong hextoul(const char *cp, char **endp)
return simple_strtoul(cp, endp, 16);
}
+unsigned long long hextoull(const char *cp, char **endp)
+{
+ return simple_strtoull(cp, endp, 16);
+}
+
ulong dectoul(const char *cp, char **endp)
{
return simple_strtoul(cp, endp, 10);