VirtualBox

vbox的更動 60025 路徑 trunk/src/VBox/Frontends


忽略:
時間撮記:
2016-3-15 上午09:28:41 (9 年 以前)
作者:
vboxsync
訊息:

VBoxManage: Tweak the rawdisk fix for nvme devices to be more versatile if other devices pick up the new naming scheme. The code checks now whether the last character of the string is a digit

檔案:
修改 1 筆資料

圖例:

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

    r60011 r60025  
    3838#include <VBox/log.h>
    3939
     40#include <iprt/ctype.h>
    4041#include <iprt/file.h>
    4142#include <iprt/getopt.h>
     
    16631664#if defined(RT_OS_LINUX)
    16641665                    /*
    1665                      * Check whether raw disk points to a nvme disk, the naming scheme
    1666                      * is slightly different there.
     1666                     * Check whether raw disk ends with a digit. In that case
     1667                     * insert a p before adding the partition number.
     1668                     * This is used for nvme devices only currently which look like
     1669                     * /dev/nvme0n1p1 but might be extended to other devices in the
     1670                     * future.
    16671671                     */
    1668                     if (rawdisk.startsWith("/dev/nvme"))
     1672                    size_t cchRawDisk = rawdisk.length();
     1673                    if (RT_C_IS_DIGIT(pszRawName[cchRawDisk - 1]))
    16691674                        RTStrAPrintf(&psz,
    16701675                                     "%sp%u",
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

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