VirtualBox

Ignore:
Timestamp:
Jan 24, 2011 5:35:59 PM (14 years ago)
Author:
vboxsync
Message:

Debugger console: more cleanup.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR3/CSAM.cpp

    r35348 r35694  
    26632663
    26642664#ifdef VBOX_WITH_DEBUGGER
     2665
    26652666/**
    26662667 * The '.csamoff' command.
     
    26752676static DECLCALLBACK(int) csamr3CmdOff(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs, PDBGCVAR pResult)
    26762677{
    2677     /*
    2678      * Validate input.
    2679      */
    2680     if (!pVM)
    2681         return pCmdHlp->pfnPrintf(pCmdHlp, NULL, "error: The command requires VM to be selected.\n");
    2682 
    2683     CSAMDisableScanning(pVM);
    2684     return pCmdHlp->pfnPrintf(pCmdHlp, NULL, "CSAM Scanning disabled\n");
     2678    DBGC_CMDHLP_REQ_VM_RET(pCmdHlp, pCmd, pVM);
     2679
     2680    int rc = CSAMDisableScanning(pVM);
     2681    if (RT_FAILURE(rc))
     2682        return DBGCCmdHlpFailRc(pCmdHlp, pCmd, rc, "CSAMDisableScanning");
     2683    return DBGCCmdHlpPrintf(pCmdHlp, "CSAM Scanning disabled\n");
    26852684}
    26862685
     
    26972696static DECLCALLBACK(int) csamr3CmdOn(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs, PDBGCVAR pResult)
    26982697{
    2699     /*
    2700      * Validate input.
    2701      */
    2702     if (!pVM)
    2703         return pCmdHlp->pfnPrintf(pCmdHlp, NULL, "error: The command requires VM to be selected.\n");
    2704 
    2705     CSAMEnableScanning(pVM);
    2706     return pCmdHlp->pfnPrintf(pCmdHlp, NULL, "CSAM Scanning enabled\n");
    2707 }
    2708 #endif
     2698    DBGC_CMDHLP_REQ_VM_RET(pCmdHlp, pCmd, pVM);
     2699
     2700    int rc = CSAMEnableScanning(pVM);
     2701    if (RT_FAILURE(rc))
     2702        return DBGCCmdHlpFailRc(pCmdHlp, pCmd, rc, "CSAMEnableScanning");
     2703    return DBGCCmdHlpPrintf(pCmdHlp, "CSAM Scanning enabled\n");
     2704}
     2705
     2706#endif /* VBOX_WITH_DEBUGGER */
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