get rid of LowCase procedure

Signed-off-by: Sergey Isakov <isakov-sl@bk.ru>
This commit is contained in:
Sergey Isakov 2020-04-13 11:43:18 +03:00
parent d341f40520
commit 319dd59b19
7 changed files with 29 additions and 15 deletions

View File

@ -2961,8 +2961,8 @@ 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);
LowCase(NameCard);
snprintf(NameCard, 32, "pci%04x,%04x", FakeVen, FakeID);
// LowCase(NameCard);
Netmodel[card] = get_net_model((FakeVen << 16) + FakeID);
}
@ -3165,7 +3165,7 @@ UINT32 FIXAirport (UINT8 *dsdt, UINT32 len)
FakeID = gSettings.FakeWIFI >> 16;
FakeVen = gSettings.FakeWIFI & 0xFFFF;
snprintf(NameCard, 32, "pci%04x,%04x", FakeVen, FakeID);
LowCase(NameCard);
// LowCase(NameCard);
}
PCIADR = GetPciDevice(dsdt, len);

View File

@ -6855,8 +6855,8 @@ GetDevices ()
default:
gfx->Vendor = Unknown;
snprintf (gfx->Model, 64, "pci%04X,%04X", Pci.Hdr.VendorId, Pci.Hdr.DeviceId);
LowCase(gfx->Model);
snprintf (gfx->Model, 64, "pci%04x,%04x", Pci.Hdr.VendorId, Pci.Hdr.DeviceId);
// LowCase(gfx->Model);
gfx->Ports = 1;
gfx->Connectors = (1 << NGFX);
gfx->ConnChanged = FALSE;

View File

@ -1322,8 +1322,8 @@ BOOLEAN get_name_pci_val(value_t *val, INTN index, BOOLEAN Sier)
return FALSE;
}
snprintf(pciName, 15, "pci1002,%04X", gSettings.FakeATI >> 16);
LowCase(pciName);
snprintf(pciName, 15, "pci1002,%04x", gSettings.FakeATI >> 16);
// LowCase(pciName);
val->type = kStr;
val->size = 13;
val->data = (UINT8 *)pciName;
@ -2114,7 +2114,7 @@ BOOLEAN setup_ati_devprop(LOADER_ENTRY *Entry, pci_dt_t *ati_dev)
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);
LowCase(compatible);
// LowCase(compatible);
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);

View File

@ -408,8 +408,8 @@ 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);
LowCase(compatible);
snprintf(compatible, 64, "pci%04x,%04x", (gSettings.FakeLAN & 0xFFFF), FakeID);
// LowCase(compatible);
devprop_add_value(device, "compatible", (UINT8*)&compatible[0], 12);
FakeID = gSettings.FakeLAN & 0xFFFF;
devprop_add_value(device, "vendor-id", (UINT8*)&FakeID, 4);

View File

@ -1838,7 +1838,7 @@ LibGetPageBreak (
return mPrintMode.PageBreak;
}
*/
//
/*
VOID LowCase (IN OUT CHAR8 *Str)
{
while (*Str) {
@ -1848,7 +1848,7 @@ VOID LowCase (IN OUT CHAR8 *Str)
Str++;
}
}
*/
UINT8 hexstrtouint8 (CHAR8* buf)
{

View File

@ -289,7 +289,7 @@ WaitFor2EventWithTsc (
EFI_STATUS
WaitForInputEventPoll(REFIT_MENU_SCREEN *Screen, UINTN TimeoutDefault);
VOID LowCase (IN OUT CHAR8 *Str);
//VOID LowCase (IN OUT CHAR8 *Str);
UINT32 hex2bin(IN CHAR8 *hex, OUT UINT8 *bin, UINT32 len);
BOOLEAN IsHexDigit (CHAR8 c);
UINT8 hexstrtouint8 (CHAR8* buf); //one or two hex letters to one byte

View File

@ -2225,8 +2225,22 @@ RefitMain (IN EFI_HANDLE ImageHandle,
#if 0
//testing place
{
CHAR16 *aaa = L"12345";
DBG(" string %ls, size=%d, len=%d sizeof=%d\n", aaa, StrSize(aaa), StrLen(aaa), sizeof(aaa));
const CHAR16 *aaa = L"12345 ";
const CHAR8 *bbb = "12345 ";
DBG(" string %ls, size=%lld, len=%lld sizeof=%ld iStrLen=%lld\n", aaa, StrSize(aaa), StrLen(aaa), sizeof(aaa), iStrLen(bbb, 10));
CHAR8 compatible[64];
UINT32 FakeLAN = 0x0030168c;
UINT32 FakeID = FakeLAN >> 16;
UINTN FakeVendor = FakeLAN & 0xFFFF;
snprintf(compatible, 64, "pci%04llx,%04x", 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));
// LowCase(compatible);
// DBG(" Low Compatible=%s strlen=%ld sizeof=%ld iStrLen=%lld\n", compatible,
// strlen(compatible), sizeof(compatible), iStrLen(compatible, 64));
}
#endif
if (!GlobalConfig.FastBoot) {