lsblk output changes based on query flags
This commit is contained in:
@@ -345,8 +345,8 @@ async function getBlockDevices() {
|
||||
throw new BoxError(BoxError.INTERNAL_ERROR, e);
|
||||
}
|
||||
|
||||
// filter only for ext4 disks
|
||||
const devices = info.blockdevices.filter(d => d.fstype === 'ext4');
|
||||
// filter only for ext4 and xfs disks
|
||||
const devices = info.blockdevices.filter(d => d.fstype === 'ext4' || d.fstype === 'xfs');
|
||||
|
||||
debug(`getBlockDevices: Found ${devices.length} devices. ${devices.map(d => d.name).join(', ')}`);
|
||||
|
||||
@@ -354,8 +354,8 @@ async function getBlockDevices() {
|
||||
return devices.map(function (d) {
|
||||
return {
|
||||
path: d.name,
|
||||
size: d.size,
|
||||
type: d.type,
|
||||
size: d.fsavail || 0,
|
||||
type: d.fstype,
|
||||
mountpoint: d.mountpoints ? d.mountpoints[0] : d.mountpoint // we only support one mountpoint here old lsblk only exposed one via .mountpoint
|
||||
};
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user