From 917b6d113b201f681c7b09cb20c0127715a2b2d5 Mon Sep 17 00:00:00 2001 From: Johannes Zellner Date: Tue, 24 Jan 2023 14:40:23 +0100 Subject: [PATCH] lsblk output changes based on query flags --- src/cloudron.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cloudron.js b/src/cloudron.js index 828d7e9c1..0a654f9e0 100644 --- a/src/cloudron.js +++ b/src/cloudron.js @@ -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 }; });