Date: Sun, 9 Jul 2000 04:00:05 -0700 (PDT) From: Robert Drehmel <robd@gmx.net> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/19772: df output wrong for union-mounts Message-ID: <200007091100.EAA24409@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/19772; it has been noted by GNATS.
From: Robert Drehmel <robd@gmx.net>
To: freebsd-gnats-submit@FreeBSD.org
Cc: bdluevel@heitec.net
Subject: Re: bin/19772: df output wrong for union-mounts
Date: Sun, 09 Jul 2000 12:54:32 +0200
This is a multi-part message in MIME format.
--------------F4ADB7FBFEE0C8F7415DC772
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
> 'df -t nonfs' lists, if two partitions are mounted
> to the same mountpoint with 'union', one of them
> twice and omits the other. 'df' by itself lists both,
> as expected.
> This also affects the "daily" report to root,
> /etc/periodic/daily/400.status-disks
Use df -n or take this patch.
I'm not quite sure for what the statfs(2) call down in regetmntinfo()
is. statfs(2) takes the path and a ``struct statfs´´ buffer as
arguments; it can not distinguish between two identical paths (who
can? :-), so the information about the last filesystem mounted on that
path is written into the buffer.
Or am I wrong ? Anyway, the patch works for me...
--
Robert S. F. Drehmel <robd@gmx.net>
linux.de: "Forget Ctrl-Alt-Del, use Linux"
Right, their productivity seems to be the same.
--------------F4ADB7FBFEE0C8F7415DC772
Content-Type: text/plain; charset=us-ascii; name="df.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="df.diff"
*** ../df.c Sun Jul 9 12:11:07 2000
--- df.c Sun Jul 9 12:09:23 2000
***************
*** 296,304 ****
for (j = 0, i = 0; i < mntsize; i++) {
if (checkvfsname(mntbuf[i].f_fstypename, vfslist))
continue;
! if (!nflag)
! (void)statfs(mntbuf[i].f_mntonname,&mntbuf[j]);
! else if (i != j)
mntbuf[j] = mntbuf[i];
j++;
}
--- 296,302 ----
for (j = 0, i = 0; i < mntsize; i++) {
if (checkvfsname(mntbuf[i].f_fstypename, vfslist))
continue;
! if (i != j)
mntbuf[j] = mntbuf[i];
j++;
}
--------------F4ADB7FBFEE0C8F7415DC772--
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200007091100.EAA24409>
