Changeset 13061 in vbox
- Timestamp:
- Oct 8, 2008 8:01:04 AM (16 years ago)
- Location:
- trunk/src/VBox/HostDrivers/Support
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/Support/SUPDrv.c
r12809 r13061 1286 1286 PSUPVMMR0REQHDR pVMMReq = (PSUPVMMR0REQHDR)&pReq->abReqPkt[0]; 1287 1287 REQ_CHECK_EXPR_FMT(pReq->Hdr.cbIn >= SUP_IOCTL_CALL_VMMR0_SIZE(sizeof(SUPVMMR0REQHDR)), 1288 ("SUP_IOCTL_CALL_VMMR0: cbIn=%#x < %# x\n", pReq->Hdr.cbIn, SUP_IOCTL_CALL_VMMR0_SIZE(sizeof(SUPVMMR0REQHDR))));1288 ("SUP_IOCTL_CALL_VMMR0: cbIn=%#x < %#lx\n", pReq->Hdr.cbIn, SUP_IOCTL_CALL_VMMR0_SIZE(sizeof(SUPVMMR0REQHDR)))); 1289 1289 REQ_CHECK_EXPR(SUP_IOCTL_CALL_VMMR0, pVMMReq->u32Magic == SUPVMMR0REQHDR_MAGIC); 1290 1290 REQ_CHECK_SIZES_EX(SUP_IOCTL_CALL_VMMR0, SUP_IOCTL_CALL_VMMR0_SIZE_IN(pVMMReq->cbReq), SUP_IOCTL_CALL_VMMR0_SIZE_OUT(pVMMReq->cbReq)); -
trunk/src/VBox/HostDrivers/Support/SUPDrvIOC.h
r12492 r13061 227 227 */ 228 228 #define SUP_IOCTL_QUERY_FUNCS(cFuncs) SUP_CTL_CODE_SIZE(2, SUP_IOCTL_QUERY_FUNCS_SIZE(cFuncs)) 229 #define SUP_IOCTL_QUERY_FUNCS_SIZE(cFuncs) RT_ OFFSETOF(SUPQUERYFUNCS, u.Out.aFunctions[(cFuncs)])229 #define SUP_IOCTL_QUERY_FUNCS_SIZE(cFuncs) RT_UOFFSETOF(SUPQUERYFUNCS, u.Out.aFunctions[(cFuncs)]) 230 230 #define SUP_IOCTL_QUERY_FUNCS_SIZE_IN sizeof(SUPREQHDR) 231 231 #define SUP_IOCTL_QUERY_FUNCS_SIZE_OUT(cFuncs) SUP_IOCTL_QUERY_FUNCS_SIZE(cFuncs) … … 338 338 */ 339 339 #define SUP_IOCTL_LDR_LOAD SUP_CTL_CODE_BIG(6) 340 #define SUP_IOCTL_LDR_LOAD_SIZE(cbImage) RT_ OFFSETOF(SUPLDRLOAD, u.In.achImage[cbImage])341 #define SUP_IOCTL_LDR_LOAD_SIZE_IN(cbImage) RT_ OFFSETOF(SUPLDRLOAD, u.In.achImage[cbImage])340 #define SUP_IOCTL_LDR_LOAD_SIZE(cbImage) RT_UOFFSETOF(SUPLDRLOAD, u.In.achImage[cbImage]) 341 #define SUP_IOCTL_LDR_LOAD_SIZE_IN(cbImage) RT_UOFFSETOF(SUPLDRLOAD, u.In.achImage[cbImage]) 342 342 #define SUP_IOCTL_LDR_LOAD_SIZE_OUT sizeof(SUPREQHDR) 343 343 … … 497 497 */ 498 498 #define SUP_IOCTL_CALL_VMMR0(cbReq) SUP_CTL_CODE_SIZE(9, SUP_IOCTL_CALL_VMMR0_SIZE(cbReq)) 499 #define SUP_IOCTL_CALL_VMMR0_SIZE(cbReq) RT_ OFFSETOF(SUPCALLVMMR0, abReqPkt[cbReq])499 #define SUP_IOCTL_CALL_VMMR0_SIZE(cbReq) RT_UOFFSETOF(SUPCALLVMMR0, abReqPkt[cbReq]) 500 500 #define SUP_IOCTL_CALL_VMMR0_SIZE_IN(cbReq) SUP_IOCTL_CALL_VMMR0_SIZE(cbReq) 501 501 #define SUP_IOCTL_CALL_VMMR0_SIZE_OUT(cbReq) SUP_IOCTL_CALL_VMMR0_SIZE(cbReq) … … 531 531 */ 532 532 #define SUP_IOCTL_LOW_ALLOC SUP_CTL_CODE_BIG(10) 533 #define SUP_IOCTL_LOW_ALLOC_SIZE(cPages) ((uint32_t)RT_ OFFSETOF(SUPLOWALLOC, u.Out.aPages[cPages]))533 #define SUP_IOCTL_LOW_ALLOC_SIZE(cPages) ((uint32_t)RT_UOFFSETOF(SUPLOWALLOC, u.Out.aPages[cPages])) 534 534 #define SUP_IOCTL_LOW_ALLOC_SIZE_IN (sizeof(SUPREQHDR) + RT_SIZEOFMEMB(SUPLOWALLOC, u.In)) 535 535 #define SUP_IOCTL_LOW_ALLOC_SIZE_OUT(cPages) SUP_IOCTL_LOW_ALLOC_SIZE(cPages) … … 589 589 */ 590 590 #define SUP_IOCTL_PAGE_ALLOC SUP_CTL_CODE_BIG(12) 591 #define SUP_IOCTL_PAGE_ALLOC_SIZE(cPages) RT_ OFFSETOF(SUPPAGEALLOC, u.Out.aPages[cPages])591 #define SUP_IOCTL_PAGE_ALLOC_SIZE(cPages) RT_UOFFSETOF(SUPPAGEALLOC, u.Out.aPages[cPages]) 592 592 #define SUP_IOCTL_PAGE_ALLOC_SIZE_IN (sizeof(SUPREQHDR) + RT_SIZEOFMEMB(SUPPAGEALLOC, u.In)) 593 593 #define SUP_IOCTL_PAGE_ALLOC_SIZE_OUT(cPages) SUP_IOCTL_PAGE_ALLOC_SIZE(cPages) … … 646 646 #define SUP_IOCTL_PAGE_LOCK_SIZE(cPages) (RT_MAX((size_t)SUP_IOCTL_PAGE_LOCK_SIZE_IN, (size_t)SUP_IOCTL_PAGE_LOCK_SIZE_OUT(cPages))) 647 647 #define SUP_IOCTL_PAGE_LOCK_SIZE_IN (sizeof(SUPREQHDR) + RT_SIZEOFMEMB(SUPPAGELOCK, u.In)) 648 #define SUP_IOCTL_PAGE_LOCK_SIZE_OUT(cPages) RT_ OFFSETOF(SUPPAGELOCK, u.Out.aPages[cPages])648 #define SUP_IOCTL_PAGE_LOCK_SIZE_OUT(cPages) RT_UOFFSETOF(SUPPAGELOCK, u.Out.aPages[cPages]) 649 649 typedef struct SUPPAGELOCK 650 650 {
Note:
See TracChangeset
for help on using the changeset viewer.