VirtualBox

Changeset 52420 in vbox for trunk/src/VBox/Runtime/r0drv


Ignore:
Timestamp:
Aug 19, 2014 7:42:35 PM (10 years ago)
Author:
vboxsync
Message:

Runtime, VBoxNetAdp: Linux 3.17 fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r0drv/linux/alloc-r0drv-linux.c

    r50077 r52420  
    188188    {
    189189        /*
    190          * Map the pages.  The API requires an iterator argument, which can be
    191          * used, in case of failure, to figure out how much was actually
    192          * mapped.  Not sure how useful this really is, but whatever.
     190         * Map the pages.
    193191         *
    194192         * Not entirely sure we really need to set nr_pages and pages here, but
     
    196194         * in the free function, if nothing else...
    197195         */
     196# if LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0)
    198197        struct page **papPagesIterator = papPages;
     198# endif
    199199        pVmArea->nr_pages = cPages;
    200200        pVmArea->pages    = papPages;
    201         if (!map_vm_area(pVmArea, PAGE_KERNEL_EXEC, &papPagesIterator))
     201        if (!map_vm_area(pVmArea, PAGE_KERNEL_EXEC,
     202# if LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0)
     203                         &papPagesIterator
     204# else
     205                         papPages
     206# endif
     207                         ))
    202208        {
    203209            PRTMEMLNXHDREX pHdrEx = (PRTMEMLNXHDREX)pVmArea->addr;
     
    206212            return &pHdrEx->Hdr;
    207213        }
    208 
    209214        /* bail out */
     215# if LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0)
    210216        pVmArea->nr_pages = papPagesIterator - papPages;
     217# endif
    211218    }
    212219
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