VirtualBox

Ignore:
Timestamp:
Aug 10, 2007 12:41:18 PM (17 years ago)
Author:
vboxsync
Message:

Cleaned up

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxGuestLib/HGCMInternal.cpp

    r4111 r4114  
    167167            for (iParm = 0; iParm < pCallInfo->cParms; iParm++, pParm++)
    168168            {
    169                 if (pParm->type == VMMDevHGCMParmType_LinAddr_Locked_In)
     169                switch (pParm->type)
     170                {
     171                case VMMDevHGCMParmType_LinAddr_Locked_In:
    170172                    pParm->type = VMMDevHGCMParmType_LinAddr_In;
    171                 else
    172                 if (pParm->type == VMMDevHGCMParmType_LinAddr_Locked_Out)
     173                    break;
     174                case VMMDevHGCMParmType_LinAddr_Locked_Out:
    173175                    pParm->type = VMMDevHGCMParmType_LinAddr_Out;
    174                 else
    175                 if (pParm->type == VMMDevHGCMParmType_LinAddr_Locked)
     176                    break;
     177                case VMMDevHGCMParmType_LinAddr_Locked:
    176178                    pParm->type = VMMDevHGCMParmType_LinAddr;
    177                 else
    178                 if (   pParm->type == VMMDevHGCMParmType_LinAddr_In
    179                     || pParm->type == VMMDevHGCMParmType_LinAddr_Out
    180                     || pParm->type == VMMDevHGCMParmType_LinAddr)
    181                 {
     179                    break;
     180
     181                case VMMDevHGCMParmType_LinAddr_In:
     182                case VMMDevHGCMParmType_LinAddr_Out:
     183                case VMMDevHGCMParmType_LinAddr:
    182184                    /* PORTME: When porting this to Darwin and other systems where the entire kernel isn't mapped
    183185                       into every process, all linear address will have to be converted to physical SG lists at
     
    188190                       These kind of problems actually applies to some patched linux kernels too, including older
    189191                       fedora releases. (The patch is the infamous 4G/4G patch, aka 4g4g, by Ingo Molnar.) */
    190                     rc = vbglLockLinear (&apvCtx[iParm], (void *)pParm->u.Pointer.u.linearAddr, pParm->u.Pointer.size, (pParm->type == VMMDevHGCMParmType_LinAddr_In) ? false : true /* write access */);
    191                    
    192                     if (VBOX_FAILURE (rc))
    193                     {
    194                         break;
    195                     }
    196                 }
     192                    rc = vbglLockLinear (&apvCtx[iParm], (void *)pParm->u.Pointer.u.linearAddr, pParm->u.Pointer.size, (pParm->type == VMMDevHGCMParmType_LinAddr_In) ? false : true /* write access */);                   
     193                    break;
     194                }
     195                if (VBOX_FAILURE (rc))
     196                    break;
    197197            }
    198198        }
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