summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaszlo Ersek <lersek@redhat.com>2023-09-12 16:17:14 +0200
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2023-09-12 15:50:30 +0000
commitc95158e419f22f296705fe7fd8f310512f180925 (patch)
tree9ffb747b1efc463bde3adbce5f6864d17daa4ae4
parent4f4a2c3b0768cd389c8f27ec77871887ba89e6f5 (diff)
downloadedk2-c95158e419f22f296705fe7fd8f310512f180925.tar.gz
edk2-c95158e419f22f296705fe7fd8f310512f180925.tar.bz2
edk2-c95158e419f22f296705fe7fd8f310512f180925.zip
OvmfPkg/PlatformBootManagerLib: refer to virtio console subsys symbolically
"OvmfPkg/Include/IndustryStandard/Virtio095.h" defines the macro VIRTIO_SUBSYSTEM_CONSOLE with value 3; other locations in the tree already use it (such as ArmVirtPkg/PlatformBootManagerLib, OvmfPkg/VirtioSerialDxe). We should use it in OvmfPkg/PlatformBootManagerLib too, rather than the naked constant 3. Signed-off-by: Laszlo Ersek <lersek@redhat.com> Acked-by: Ard Biesheuvel <ardb@kernel.org>
-rw-r--r--OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c
index 88c39df4ae..d9f61757cf 100644
--- a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c
+++ b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c
@@ -1250,7 +1250,7 @@ DetectAndPreparePlatformVirtioDevicePath (
DEBUG ((DEBUG_INFO, "%a:%d: id %d\n", __func__, __LINE__, VirtIo->SubSystemDeviceId));
switch (VirtIo->SubSystemDeviceId) {
- case 3:
+ case VIRTIO_SUBSYSTEM_CONSOLE:
PrepareVirtioSerialDevicePath (Handle);
break;
default: