VirtualBox

忽略:
時間撮記:
2009-11-3 上午10:57:41 (15 年 以前)
作者:
vboxsync
訊息:

DrvNetSniffer: fixed cMaxInstances; append the instance number to the default log file if no filename was specified

檔案:
修改 1 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/Devices/Network/DrvNetSniffer.cpp

    r22460 r24285  
    399399    int rc = CFGMR3QueryString(pCfgHandle, "File", pThis->szFilename, sizeof(pThis->szFilename));
    400400    if (rc == VERR_CFGM_VALUE_NOT_FOUND)
    401         RTStrPrintf(pThis->szFilename, sizeof(pThis->szFilename), "./VBox-%x.pcap", RTProcSelf());
     401    {
     402        if (pDrvIns->iInstance > 0)
     403            RTStrPrintf(pThis->szFilename, sizeof(pThis->szFilename), "./VBox-%x-%u.pcap", RTProcSelf(), pDrvIns->iInstance);
     404        else
     405            RTStrPrintf(pThis->szFilename, sizeof(pThis->szFilename), "./VBox-%x.pcap", RTProcSelf());
     406    }
     407
    402408    else if (RT_FAILURE(rc))
    403409    {
     
    491497    PDM_DRVREG_CLASS_NETWORK,
    492498    /* cMaxInstances */
    493     1,
     499    UINT32_MAX,
    494500    /* cbInstance */
    495501    sizeof(DRVNETSNIFFER),
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

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