At the moment, please add new issues via taiga, not gitea, they aren't synced, and we can't properly schedule work without the task being in taiga.
I think this will include the character device, block device, and partitions (and also /dev/nvme-fabrics
which I don't even know what it is). A better option is to look in /sys/block/nvme*
. That will only include the main block device (e.g. nvme0n1
), and then you can join /dev/
and the file name.
There's no lsblk
in Synology DSM or openwrt. You could search for /sys/block/*/device
similarly as when looking for the disk sizes.
This can be rounded up, because on systems which have 1GB of RAM, it will result in 0GB (because it subtracts the amount allocated for the kernel).
There is a trick to make the code more readable. Use a negative condition and continue
. This will reduce indentation.