mirror of https://github.com/aristocratos/btop.git
get more disk IO stats
This commit is contained in:
parent
7fa903cf16
commit
8fad5a61be
|
@ -536,7 +536,11 @@ namespace Mem {
|
||||||
IORegistryEntryGetParentEntry(drive, kIOServicePlane, &volumeRef);
|
IORegistryEntryGetParentEntry(drive, kIOServicePlane, &volumeRef);
|
||||||
if (volumeRef) {
|
if (volumeRef) {
|
||||||
if (!isWhole(volumeRef)) {
|
if (!isWhole(volumeRef)) {
|
||||||
|
string bsdName = getCFString(volumeRef, CFSTR("BSD Name"));
|
||||||
string device = getCFString(volumeRef, CFSTR("VolGroupMntFromName"));
|
string device = getCFString(volumeRef, CFSTR("VolGroupMntFromName"));
|
||||||
|
if (!mapping.contains(device)) {
|
||||||
|
device = "/dev/" + bsdName; // try again with BSD name - not all volumes seem to have VolGroupMntFromName property
|
||||||
|
}
|
||||||
if (device != "") {
|
if (device != "") {
|
||||||
if (mapping.contains(device)) {
|
if (mapping.contains(device)) {
|
||||||
string mountpoint = mapping.at(device);
|
string mountpoint = mapping.at(device);
|
||||||
|
|
Loading…
Reference in New Issue