Changeset 52420 in vbox for trunk/src/VBox/Runtime/r0drv
- Timestamp:
- Aug 19, 2014 7:42:35 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r0drv/linux/alloc-r0drv-linux.c
r50077 r52420 188 188 { 189 189 /* 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. 193 191 * 194 192 * Not entirely sure we really need to set nr_pages and pages here, but … … 196 194 * in the free function, if nothing else... 197 195 */ 196 # if LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0) 198 197 struct page **papPagesIterator = papPages; 198 # endif 199 199 pVmArea->nr_pages = cPages; 200 200 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 )) 202 208 { 203 209 PRTMEMLNXHDREX pHdrEx = (PRTMEMLNXHDREX)pVmArea->addr; … … 206 212 return &pHdrEx->Hdr; 207 213 } 208 209 214 /* bail out */ 215 # if LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0) 210 216 pVmArea->nr_pages = papPagesIterator - papPages; 217 # endif 211 218 } 212 219
Note:
See TracChangeset
for help on using the changeset viewer.