mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-11 06:06:52 +03:00
Currently we are trying to work out if the vendor id is from a virtio-mmio device and then casting a u32 to a char* and using it as a C-string. By chance there is usually a zero after the u32 and it works. Since the vendor id we are trying to convert to a string is QEMU's just define a value for the QEMU vendor id, check if the vendor id matches and then use a predefined string for "QEMU". I don't think we should have been assumming all virtio-mmio vendor ids are printable ASCII chars in the first place so do this special casing just for QEMU. If the vendor id isn't QEMU print the hex value of it. Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Kuan-Wei Chiu <visitorckw@gmail.com> Signed-off-by: Daniel Palmer <daniel@thingy.jp>