diff --git a/rEFIt_UEFI/Platform/FixBiosDsdt.cpp b/rEFIt_UEFI/Platform/FixBiosDsdt.cpp index c750ac4879..dca54debdc 100755 --- a/rEFIt_UEFI/Platform/FixBiosDsdt.cpp +++ b/rEFIt_UEFI/Platform/FixBiosDsdt.cpp @@ -2961,7 +2961,7 @@ UINT32 FIXNetwork (UINT8 *dsdt, UINT32 len, UINT32 card) if (gSettings.FakeLAN) { FakeID = gSettings.FakeLAN >> 16; FakeVen = gSettings.FakeLAN & 0xFFFF; - snprintf(NameCard, 32, "pci%04x,%04x", FakeVen, FakeID); + snprintf(NameCard, 32, "pci%x,%x", FakeVen, FakeID); Netmodel[card] = get_net_model((FakeVen << 16) + FakeID); } @@ -3163,7 +3163,7 @@ UINT32 FIXAirport (UINT8 *dsdt, UINT32 len) if (gSettings.FakeWIFI) { FakeID = gSettings.FakeWIFI >> 16; FakeVen = gSettings.FakeWIFI & 0xFFFF; - snprintf(NameCard, 32, "pci%04x,%04x", FakeVen, FakeID); + snprintf(NameCard, 32, "pci%x,%x", FakeVen, FakeID); } PCIADR = GetPciDevice(dsdt, len); diff --git a/rEFIt_UEFI/Platform/Settings.cpp b/rEFIt_UEFI/Platform/Settings.cpp index 018a3c9286..c7e4590a65 100644 --- a/rEFIt_UEFI/Platform/Settings.cpp +++ b/rEFIt_UEFI/Platform/Settings.cpp @@ -6863,7 +6863,7 @@ GetDevices () default: gfx->Vendor = Unknown; - snprintf (gfx->Model, 64, "pci%04x,%04x", Pci.Hdr.VendorId, Pci.Hdr.DeviceId); + snprintf (gfx->Model, 64, "pci%x,%x", Pci.Hdr.VendorId, Pci.Hdr.DeviceId); gfx->Ports = 1; gfx->Connectors = (1 << NGFX); gfx->ConnChanged = FALSE; diff --git a/rEFIt_UEFI/Platform/ati.cpp b/rEFIt_UEFI/Platform/ati.cpp index 8edde532bf..1dface1200 100644 --- a/rEFIt_UEFI/Platform/ati.cpp +++ b/rEFIt_UEFI/Platform/ati.cpp @@ -1322,7 +1322,7 @@ BOOLEAN get_name_pci_val(value_t *val, INTN index, BOOLEAN Sier) return FALSE; } - snprintf(pciName, 15, "pci1002,%04x", gSettings.FakeATI >> 16); + snprintf(pciName, 15, "pci1002,%x", gSettings.FakeATI >> 16); val->type = kStr; val->size = 13; val->data = (UINT8 *)pciName; @@ -2112,7 +2112,7 @@ BOOLEAN setup_ati_devprop(LOADER_ENTRY *Entry, pci_dt_t *ati_dev) FakeID = gSettings.FakeATI >> 16; devprop_add_value(card->device, "device-id", (UINT8*)&FakeID, 4); devprop_add_value(card->device, "ATY,DeviceID", (UINT8*)&FakeID, 2); - snprintf(compatible, 64, "pci1002,%04x", FakeID); + snprintf(compatible, 64, "pci1002,%x", FakeID); devprop_add_value(card->device, "@0,compatible", (UINT8*)&compatible[0], 12); FakeID = gSettings.FakeATI & 0xFFFF; devprop_add_value(card->device, "vendor-id", (UINT8*)&FakeID, 4); diff --git a/rEFIt_UEFI/Platform/device_inject.cpp b/rEFIt_UEFI/Platform/device_inject.cpp index 1818179f04..fc5652d7ef 100644 --- a/rEFIt_UEFI/Platform/device_inject.cpp +++ b/rEFIt_UEFI/Platform/device_inject.cpp @@ -408,7 +408,7 @@ BOOLEAN set_eth_props(pci_dt_t *eth_dev) if (gSettings.FakeLAN) { UINT32 FakeID = gSettings.FakeLAN >> 16; devprop_add_value(device, "device-id", (UINT8*)&FakeID, 4); - snprintf(compatible, 64, "pci%04x,%04x", (gSettings.FakeLAN & 0xFFFF), FakeID); + snprintf(compatible, 64, "pci%x,%x", (gSettings.FakeLAN & 0xFFFF), FakeID); devprop_add_value(device, "compatible", (UINT8*)&compatible[0], 12); FakeID = gSettings.FakeLAN & 0xFFFF; devprop_add_value(device, "vendor-id", (UINT8*)&FakeID, 4); diff --git a/rEFIt_UEFI/refit/main.cpp b/rEFIt_UEFI/refit/main.cpp index b038d19d85..8553adf954 100644 --- a/rEFIt_UEFI/refit/main.cpp +++ b/rEFIt_UEFI/refit/main.cpp @@ -2232,8 +2232,8 @@ RefitMain (IN EFI_HANDLE ImageHandle, CHAR8 compatible[64]; UINT32 FakeLAN = 0x0030168c; UINT32 FakeID = FakeLAN >> 16; - UINTN FakeVendor = FakeLAN & 0xFFFF; - snprintf(compatible, 64, "pci%04llx,%04x", FakeVendor, FakeID); + UINT32 FakeVendor = FakeLAN & 0xFFFF; + snprintf(compatible, 64, "pci%x,%x", FakeVendor, FakeID); DBG(" FakeLAN = 0x%x\n", FakeLAN); DBG(" Compatible=%s strlen=%ld sizeof=%ld iStrLen=%lld\n", compatible, strlen(compatible), sizeof(compatible), iStrLen(compatible, 64));