Commit 3e3fc53
committed
Replace size reporting with sysfs helper; keep fdisk for partition tables
fdisk -l can’t be trusted inside Heads’ initrd: busybox limits it to
2 TiB and parsing its output is fragile.
Changes relative to origin/master:
* add new function disk_info_sysfs() in initrd/etc/functions
– walks /sys/block, skips partition entries, and computes a byte
count (preferring blockdev --getsize64, otherwise size*512)
– converts to decimal GB, switching to TB for ≥1000 GB
* update show_system_info() (gui_functions & oem‑system‑info‑xx30) to call the
helper and no longer invoke `fdisk -l` for size output
* add TRACE_FUNC/DEBUG logging around the helper invocation
Tested in qemu/debian‑13/PureOS; only the size line differs, other behaviour
is identical to master.
Signed-off-by: Thierry Laurion <insurgo@riseup.net>1 parent 6ab7d10 commit 3e3fc53
1 file changed
Lines changed: 3 additions & 27 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1297 | 1297 | | |
1298 | 1298 | | |
1299 | 1299 | | |
1300 | | - | |
| 1300 | + | |
1301 | 1301 | | |
1302 | 1302 | | |
1303 | | - | |
1304 | | - | |
1305 | | - | |
1306 | | - | |
1307 | | - | |
1308 | | - | |
1309 | 1303 | | |
1310 | | - | |
1311 | | - | |
1312 | | - | |
1313 | | - | |
1314 | | - | |
1315 | | - | |
1316 | | - | |
1317 | | - | |
1318 | | - | |
1319 | | - | |
1320 | | - | |
1321 | | - | |
1322 | | - | |
1323 | | - | |
1324 | | - | |
1325 | | - | |
1326 | | - | |
1327 | | - | |
1328 | | - | |
1329 | | - | |
| 1304 | + | |
| 1305 | + | |
1330 | 1306 | | |
1331 | 1307 | | |
1332 | 1308 | | |
| |||
0 commit comments