16 Oct
2026
16 Oct
'26
7:22 a.m.
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 <marmarek@invisiblethingslab.com> --- src/util/virpci.c | 2 ++ 1 file changed, 2 insertions(+)
Reviewed-by: Michal Privoznik <mprivozn@redhat.com> Michal