VirtualBox

儲存庫 vbox 的更動 18224


忽略:
時間撮記:
2009-3-24 下午07:46:12 (16 年 以前)
作者:
vboxsync
訊息:

VBoxHeadless: don't ignore the return code of RTR3InitAndSUPLib() (non-hardened builds)

檔案:
修改 1 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/Frontends/VBoxHeadless/VBoxHeadless.cpp

    r17669 r18224  
    4444#include <iprt/getopt.h>
    4545#include <iprt/env.h>
     46#include <VBox/err.h>
    4647
    4748#ifdef VBOX_FFMPEG
     
    630631    if (FAILED(rc))
    631632    {
    632         RTPrintf("ERROR: failed to initialize COM!\n");
     633        RTPrintf("VBoxHeadless: ERROR: failed to initialize COM!\n");
    633634        return rc;
    634635    }
     
    641642        rc = virtualBox.createLocalObject(CLSID_VirtualBox);
    642643        if (FAILED(rc))
    643             RTPrintf("ERROR: failed to create the VirtualBox object!\n");
     644            RTPrintf("VBoxHeadless: ERROR: failed to create the VirtualBox object!\n");
    644645        else
    645646        {
    646647            rc = session.createInprocObject(CLSID_Session);
    647648            if (FAILED(rc))
    648                 RTPrintf("ERROR: failed to create a session object!\n");
     649                RTPrintf("VBoxHeadless: ERROR: failed to create a session object!\n");
    649650        }
    650651
     
    959960{
    960961    // initialize VBox Runtime
    961     RTR3InitAndSUPLib();
     962    int rc = RTR3InitAndSUPLib();
     963    if (RT_FAILURE(rc))
     964    {
     965        RTPrintf("VBoxHeadless: Runtime Error!\n");
     966        switch (rc)
     967        {
     968            case VERR_VM_DRIVER_NOT_INSTALLED:
     969                RTPrintf("Cannot access the kernel driver. Make sure the kernel module has been \n"
     970                        "loaded successfully. Aborting ...\n");
     971                break;
     972            default:
     973                break;
     974        }
     975        return 1;
     976    }
     977
    962978    return TrustedMain (argc, argv, envp);
    963979}
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette