lsblk output changes based on query flags

This commit is contained in:
Johannes Zellner
2023-01-24 14:40:23 +01:00
parent 8298e26881
commit 917b6d113b

View File

@@ -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
};
});