- Timestamp:
- Sep 16, 2007 8:46:09 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/Support/solaris/SUPDrv-solaris.c
r4824 r4834 40 40 #include <iprt/initterm.h> 41 41 #include <iprt/alloc.h> 42 #include <iprt/string.h> 42 43 43 44 … … 170 171 ddi_soft_state_fini(&g_pVBoxDrvSolarisState); 171 172 173 cmn_err(CE_CONT, "VBoxDrvSolaris _init returns %d", e); 172 174 return e; 173 175 } … … 188 190 { 189 191 cmn_err(CE_CONT, "VBoxDrvSolaris _info"); 190 return mod_info (&g_VBoxDrvSolarisModLinkage, pModInfo); 192 int e = mod_info (&g_VBoxDrvSolarisModLinkage, pModInfo); 193 cmn_err(CE_CONT, "VBoxDrvSolaris _info returns %d", e); 194 return e; 191 195 } 192 196 … … 501 505 #ifndef IOCPARM_LEN 502 506 # define IOCPARM_LEN(x) ( ((x) >> 16) & IOCPARM_MASK ) 503 #endif 507 #endif 504 508 505 509 … … 525 529 * Read the header. 526 530 */ 527 if (RT_UNLIKELY(IOC _PARMLEN(iCmd) != sizeof(Hdr)))528 { 529 OSDBGPRINT(("VBoxDrvSolarisIOCtlSlow: iCmd=%#x len %d expected %d\n", iCmd, IOC _PARMLEN(iCmd), sizeof(Hdr)));531 if (RT_UNLIKELY(IOCPARM_LEN(iCmd) != sizeof(Hdr))) 532 { 533 OSDBGPRINT(("VBoxDrvSolarisIOCtlSlow: iCmd=%#x len %d expected %d\n", iCmd, IOCPARM_LEN(iCmd), sizeof(Hdr))); 530 534 return EINVAL; 531 535 } 532 rc = ddi_copyin( &Hdr, (void *)iArg, sizeof(Hdr), Mode);536 rc = ddi_copyin((void *)iArg, &Hdr, sizeof(Hdr), Mode); 533 537 if (RT_UNLIKELY(rc)) 534 538 { … … 544 548 if (RT_UNLIKELY( Hdr.cbIn < sizeof(Hdr) 545 549 || Hdr.cbOut < sizeof(Hdr) 546 || cb Req> _1M*16))550 || cbBuf > _1M*16)) 547 551 { 548 552 OSDBGPRINT(("VBoxDrvSolarisIOCtlSlow: max(%#x,%#x); iCmd=%#x\n", Hdr.cbIn, Hdr.cbOut, iCmd)); … … 559 563 return ENOMEM; 560 564 } 561 rc = ddi_copyin( pHdr, (void *)iArg, cbBuf, Mode);565 rc = ddi_copyin((void *)iArg, pHdr, cbBuf, Mode); 562 566 if (RT_UNLIKELY(rc)) 563 567 { … … 570 574 * Process the IOCtl. 571 575 */ 572 rc = supdrvIOCtl( Cmd, &g_DevExt, pSession, pHdr);576 rc = supdrvIOCtl(iCmd, &g_DevExt, pSession, pHdr); 573 577 574 578 /* … … 661 665 662 666 va_start(args, pszFormat); 663 vsnprintf(szMsg, sizeof(szMsg) - 1, pszFormat, args);667 RTStrPrintfV(szMsg, sizeof(szMsg) - 1, pszFormat, args); 664 668 va_end(args); 665 669 666 670 szMsg[sizeof(szMsg) - 1] = '\0'; 667 uprintf(" %s", szMsg);671 uprintf("SUPR0Printf: %s", szMsg); 668 672 return 0; 669 673 } 674
Note:
See TracChangeset
for help on using the changeset viewer.