VirtualBox

Changeset 44990 in vbox for trunk/src/VBox/Additions/common


Ignore:
Timestamp:
Mar 11, 2013 2:42:39 PM (12 years ago)
Author:
vboxsync
Message:

VBoxGuest-win*: More cleanups.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-win.cpp

    r44989 r44990  
    285285{
    286286#ifdef LOG_ENABLED
    287     PCM_PARTIAL_RESOURCE_DESCRIPTOR resource = pResourceList->PartialDescriptors;
    288     ULONG nres = pResourceList->Count;
    289     ULONG i;
    290 
    291     for (i = 0; i < nres; ++i, ++resource)
    292     {
    293         ULONG uType = resource->Type;
    294         static char* aszName[] =
     287    PCM_PARTIAL_RESOURCE_DESCRIPTOR pResource = pResourceList->PartialDescriptors;
     288    ULONG cResources = pResourceList->Count;
     289
     290    for (ULONG i = 0; i < cResources; ++i, ++pResource)
     291    {
     292        ULONG uType = pResource->Type;
     293        static char const * const s_apszName[] =
    295294        {
    296295            "CmResourceTypeNull",
     
    306305        };
    307306
    308         Log(("VBoxGuest::vbgdNtShowDeviceResources: Type %s",
    309                uType < (sizeof(aszName) / sizeof(aszName[0]))
    310              ? aszName[uType] : "Unknown"));
     307        Log(("VBoxGuest::vbgdNtShowDeviceResources: Type %s", uType < RT_ELEMENTS(s_apszName) ? aszName[uType] : "Unknown"));
    311308
    312309        switch (uType)
     
    315312            case CmResourceTypeMemory:
    316313                Log(("VBoxGuest::vbgdNtShowDeviceResources: Start %8X%8.8lX length %X\n",
    317                          resource->u.Port.Start.HighPart, resource->u.Port.Start.LowPart,
    318                          resource->u.Port.Length));
     314                     pResource->u.Port.Start.HighPart, pResource->u.Port.Start.LowPart,
     315                     pResource->u.Port.Length));
    319316                break;
    320317
    321318            case CmResourceTypeInterrupt:
    322319                Log(("VBoxGuest::vbgdNtShowDeviceResources: Level %X, Vector %X, Affinity %X\n",
    323                          resource->u.Interrupt.Level, resource->u.Interrupt.Vector,
    324                          resource->u.Interrupt.Affinity));
     320                     pResource->u.Interrupt.Level, pResource->u.Interrupt.Vector,
     321                     pResource->u.Interrupt.Affinity));
    325322                break;
    326323
    327324            case CmResourceTypeDma:
    328325                Log(("VBoxGuest::vbgdNtShowDeviceResources: Channel %d, Port %X\n",
    329                          resource->u.Dma.Channel, resource->u.Dma.Port));
     326                     pResource->u.Dma.Channel, pResource->u.Dma.Port));
    330327                break;
    331328
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette