On 10/16/26 02:04, Marek Marczykowski-Górecki wrote: > The referenced commit removed trimming newline resulting in errors like: > > Unusual value in /sys/bus/pci//devices/0000:00:17.0/class: 0x010601 > > It's a perfectly valid class, it's just the newline that virStrToLong_ui > didn't like (as it wasn't parsed and endptr is given NULL). > > Restore stripping newline, but do so a bit nicer than hardcoded offset. > > Fixes: 58b3a78aff "virPCIDeviceReadClass: Don't write beyond end of buffer > from virFileReadAll" > Signed-off-by: Marek Marczykowski-Górecki <[email protected]> > --- > src/util/virpci.c | 2 ++ > 1 file changed, 2 insertions(+) >
Reviewed-by: Michal Privoznik <[email protected]> Michal
