Closed fwortner closed 2 years ago
The problem does not afflict 2.9 BSD file systems.
dev/fuse 4807 2217 2590 47% /home/frank/retro-fuse/bsd29/root
Thank you for the bug report! I will try to take a look at it in the next few days.
I humbly suggest this fix.
> --- a/src/bsd211fs.c
> +++ b/src/bsd211fs.c
> @@ -954,8 +954,9 @@ int bsd211fs_statfs(const char *pathname, struct statvfs *statvfsbuf)
> statvfsbuf->f_bsize = MAXBSIZE;
> statvfsbuf->f_frsize = MAXBSIZE;
> statvfsbuf->f_blocks = wswap_int32(bsd211_mount[0].m_filsys.fs_fsize);
> - statvfsbuf->f_bfree = bsd211_mount[0].m_filsys.fs_tfree;
> - statvfsbuf->f_bavail = bsd211_mount[0].m_filsys.fs_tfree;
> + statvfsbuf->f_bfree = wswap_int32(bsd211_mount[0].m_filsys.fs_tfree);
> +
> + statvfsbuf->f_bavail = wswap_int32(bsd211_mount[0].m_filsys.fs_tfree);
> statvfsbuf->f_files = (bsd211_mount[0].m_filsys.fs_isize - 2) * INOPB;
> statvfsbuf->f_ffree = bsd211_mount[0].m_filsys.fs_tinode;
> statvfsbuf->f_favail = bsd211_mount[0].m_filsys.fs_tinode;
Fixed in change 1a03deb
Thank you, Jay!
On Tue, Aug 23, 2022 at 5:15 PM Jay Logue @.***> wrote:
Closed #5 https://github.com/jaylogue/retro-fuse/issues/5 as completed.
— Reply to this email directly, view it on GitHub https://github.com/jaylogue/retro-fuse/issues/5#event-7245632452, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAK4H6AHUGKWSNRBMNQ6B3LV2U5P7ANCNFSM56TZXKWA . You are receiving this because you authored the thread.Message ID: @.***>
-- "Jazz music stimulates the minds and uplifts the souls of those who play it was well as of those who listen to immerse themselves in it. As the mind is stimulated and the soul uplifted, this is eventually reflected in the body." -- Horace Silver
When running a df command with a mounted 2.11 BSD file system, the information displayed in the Used and Available space report is very wrong. V6 and V7 file systems seem to work correctly.
The environment is a PiDP-11 (Raspberry Pi) running on
uname -a Linux pidp-11 4.19.66-v7+ #1253 SMP Thu Aug 15 11:49:46 BST 2019 armv7l GNU/Linux
rank@pidp-11:\~$ df Filesystem 1K-blocks Used Available Use% Mounted on /dev/root 30568540 27793076 1470080 95% / devtmpfs 469544 0 469544 0% /dev tmpfs 474152 0 474152 0% /dev/shm tmpfs 474152 24520 449632 6% /run tmpfs 5120 4 5116 1% /run/lock tmpfs 474152 0 474152 0% /sys/fs/cgroup /dev/mmcblk0p1 43539 22856 20683 53% /boot tmpfs 94828 0 94828 0% /run/user/1000 tmpfs 94828 0 94828 0% /run/user/1002 /dev/fuse 7942 -276881658 276889600 - /home/frank/retro-fuse/211root /dev/fuse 1044573 -18446744072831438767 -877068276 100% /home/frank/retro-fuse/211bsdhome /dev/fuse 4800 3239 1561 68% /home/frank/retro-fuse/v7/root /dev/fuse 2000 1515 486 76% /home/frank/retro-fuse/v6/root frank@pidp-11:\~$