VirtualBox

Changeset 2916 in vbox for trunk/src/VBox


Ignore:
Timestamp:
May 29, 2007 1:15:23 PM (18 years ago)
Author:
vboxsync
Message:

FE/BFE: at least show runtime errors on the text console

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxBFE/VBoxBFE.cpp

    r2905 r2916  
    892892
    893893
     894/**
     895 * VM Runtime error callback function. Called by the various VM components.
     896 *
     897 * @param   pVM         The VM handle.
     898 * @param   pvUser      The user argument.
     899 * @param   fFata       Wheather it is a fatal error or not.
     900 * @param   pszErrorId  Error ID string.
     901 * @param   pszError    Error message format string.
     902 * @param   args        Error message arguments.
     903 * @thread EMT.
     904 */
     905DECLCALLBACK(void) setVMRuntimeErrorCallback(PVM pVM, void *pvUser, bool fFatal,
     906                                             const char *pszErrorId,
     907                                             const char *pszFormat, va_list args)
     908{
     909    RTPrintf("%s: %s!\n%N!\n", fFatal ? "Error" : "Warning", pszErrorId, pszFormat, &args);
     910}
     911
     912
    894913/** VM asynchronous operations thread */
    895914DECLCALLBACK(int) VMPowerUpThread(RTTHREAD Thread, void *pvUser)
     
    10641083    PCFGMNODE pRoot = CFGMR3GetRoot(pVM);
    10651084    rc = CFGMR3InsertString(pRoot,  "Name",                 "Default VM");          UPDATE_RC();
    1066     rc = CFGMR3InsertInteger(pRoot, "RamSize",              g_u32MemorySizeMB * _1M);      UPDATE_RC();
     1085    rc = CFGMR3InsertInteger(pRoot, "RamSize",            g_u32MemorySizeMB * _1M); UPDATE_RC();
    10671086    if (g_fPreAllocRam)
    10681087    {
     
    11141133    rc = CFGMR3InsertInteger(pInst, "Trusted",              1);     /* boolean */   UPDATE_RC();
    11151134    rc = CFGMR3InsertNode(pInst,    "Config", &pCfg);                               UPDATE_RC();
    1116     rc = CFGMR3InsertInteger(pCfg,  "RamSize",              g_u32MemorySizeMB * _1M);      UPDATE_RC();
     1135    rc = CFGMR3InsertInteger(pCfg,  "RamSize",            g_u32MemorySizeMB * _1M); UPDATE_RC();
    11171136    rc = CFGMR3InsertString(pCfg,   "BootDevice0",          pszBootDevice);         UPDATE_RC();
    11181137    rc = CFGMR3InsertString(pCfg,   "BootDevice1",          "NONE");                UPDATE_RC();
     
    11311150    /* Boot menu */
    11321151    rc = CFGMR3InsertInteger(pCfg,  "ShowBootMenu",         g_iBootMenu);           UPDATE_RC();
    1133 
    11341152
    11351153    /*
     
    15831601#undef UPDATE_RC
    15841602
     1603    VMR3AtRuntimeErrorRegister (pVM, setVMRuntimeErrorCallback, NULL);
     1604
    15851605    return rc;
    15861606}
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