@@ -78,6 +78,7 @@ static void parsePhysicalDisk(int dfd, const char* devName, FFPhysicalDiskOption
78
78
ffStrbufInitMove (& device -> name , & name );
79
79
ffStrbufInitF (& device -> devPath , "/dev/%s" , devName );
80
80
81
+ bool isVirtual = false;
81
82
{
82
83
ffStrbufInit (& device -> interconnect );
83
84
if (ffStrStartsWith (devName , "nvme" ))
@@ -97,6 +98,8 @@ static void parsePhysicalDisk(int dfd, const char* devName, FFPhysicalDiskOption
97
98
ffStrbufSetStatic (& device -> interconnect , "SCSI" );
98
99
else if (strstr (pathSysDeviceReal , "/nvme" ) != NULL )
99
100
ffStrbufSetStatic (& device -> interconnect , "NVMe" );
101
+ else if (strstr (pathSysDeviceReal , "/virtio" ) != NULL )
102
+ ffStrbufSetStatic (& device -> interconnect , "Virtual" );
100
103
else
101
104
{
102
105
if (ffAppendFileBufferRelative (devfd , "transport" , & device -> interconnect ))
@@ -106,6 +109,7 @@ static void parsePhysicalDisk(int dfd, const char* devName, FFPhysicalDiskOption
106
109
}
107
110
}
108
111
112
+ if (!isVirtual )
109
113
{
110
114
char isRotationalChar = '1' ;
111
115
if (ffReadFileDataRelative (dfd , "queue/rotational" , 1 , & isRotationalChar ) > 0 )
0 commit comments