On 23.07.2025 17:19, Roger Pau Monne wrote: > The current strtoll() implementation in hvmloader requires hex number to be > prefixed with 0x, otherwise strtoll() won't parse them correctly even when > calling the function with base == 16. > > Fix this by not unconditionally setting the base to 10 when the string is > not 0 prefixed, this also allows parsing octal numbers not 0 prefixed. > While there also handle '0X' as a valid hex number prefix, together with > '0x'. > > No functional change intended to the existing call sites. > > Signed-off-by: Roger Pau Monné <roger....@citrix.com>
Reviewed-by: Jan Beulich <jbeul...@suse.com> > --- > Noticed this oddity while looking at something else - I don't really have a > use case for such parsing, but I think it would be better to get this fixed > in case it's needed in the future. I agree. Without it actually mattering right now, I don't think I'll pick it up for backporting, though. Jan