root@mowa219-gjp4-8570p:~ # sfdisk-linux -s cannot open /proc/partitions total: 0 blocks root@mowa219-gjp4-8570p:~ # sfdisk-linux -s /dev/da2 15155200 root@mowa219-gjp4-8570p:~ # mount | grep proc procfs on /proc (procfs, local) linprocfs on /compat/linux/proc (linprocfs, local) linprocfs on /compat/ubuntu/proc (linprocfs, local) root@mowa219-gjp4-8570p:~ # uname -KrU 14.0-CURRENT 1400025 1400025 root@mowa219-gjp4-8570p:~ # pkg query '%o %v %R' linuxfdisk sysutils/linuxfdisk 2.11z FreeBSD root@mowa219-gjp4-8570p:~ # % man 8 sfdisk-linux … SFDISK(8) Linux Programmer's Manual SFDISK(8) … If the partition argument is omitted, sfdisk will list the sizes of all disks, and the total: % sfdisk-linux -s /dev/ad0: 208896 /dev/ad1: 1025136 /dev/ad2: 1031063 /dev/da0: 8877895 /dev/da1: 1758927 total: 12901917 blocks %
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=f23c04a72db50cb8ce679caf4a7997cde166afdf commit f23c04a72db50cb8ce679caf4a7997cde166afdf Author: Alexey Dokuchaev <danfe@FreeBSD.org> AuthorDate: 2021-07-09 08:03:48 +0000 Commit: Alexey Dokuchaev <danfe@FreeBSD.org> CommitDate: 2021-07-09 08:03:42 +0000 sysutils/linuxfdisk: use better PROC_PARTITIONS path on FreeBSD Originating from GNU/Linux, this code had naturally defined the PROC_PARTITIONS macro as "/proc/partitions", while we typically mount this file system under "/compat/linux/proc/partitions" on FreeBSD. Fix two (out of four) definitions which appear in the generated executables, so e.g. `sfdisk-linux -s' would now work correctly so long as linprocfs(5) is mounted. While at it, set the LICENSE (GPLv2+) and bump PORTREVISION so users could enjoy less buggy package. PR: 257072 sysutils/linuxfdisk/Makefile | 3 +++ sysutils/linuxfdisk/files/patch-FreeBSD | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+)
Should be fixed now, thanks for reporting!
Thanks for fixing so quickly!