tags 319836 + wontfix
retitle 319836 "doesn't add read-only mounted devices to totals"
thanks 

hi again,

On Mon, Jul 25, 2005 at 01:09:27PM +0200, Miernik wrote:
> On Mon, Jul 25, 2005 at 12:53:13PM +0200, Michael Ablassmeier wrote:
> > Thanks. Hmm.. just out of curiosity, whats the output `di -t /usr/'?
> > Does /etc/fstab contain any mount options (besides default) for /usr? 
>
> [..]
> 
> Maybe the read-only is the problem?
> Yes, when I remount it rw, it is OK:
> 
> szrenica:~$ di -t /usr/
> Filesystem         Mount               Megs     Used    Avail %used fs Type
> /dev/hda5          /usr               745.9    540.6    167.4  78%  ext3
>                    Total              745.9    540.6    167.4  78%

there we go! Seems like this is intended, thought. Heres the code:

     /* only total the disks that make sense! */
     /* don't add memory filesystems to totals. */
     if (diskInfo [i].printFlag == DI_PRNT_OK &&
        strcmp (diskInfo [i].fsType, "tmpfs") != 0 &&
        strcmp (diskInfo [i].fsType, "mfs") != 0 &&
        diskInfo [i].isReadOnly == FALSE)
        {
                addTotals (&diskInfo [i], &totals);
        }

so, disks which are mounted read only are not added to the totals
information, which makes (at least sort of) sense to me. This is not
mentioned in the Manpage, i'm going to forward this bugreport to
upstream and ask about it. Patch attached. Until response by upstream,
im setting the report to wontfix.. Thanks for your report and time.

bye,
    - michael
--- di-3.11.dfsg.1.orig/di.c    2004-03-16 22:28:07.000000000 +0100
+++ di-3.11.dfsg.1/di.c 2005-07-25 13:25:49.000000000 +0200
@@ -670,8 +670,8 @@
                 /* don't add memory filesystems to totals. */
             if (diskInfo [i].printFlag == DI_PRNT_OK &&
                 strcmp (diskInfo [i].fsType, "tmpfs") != 0 &&
-                strcmp (diskInfo [i].fsType, "mfs") != 0 &&
-                diskInfo [i].isReadOnly == FALSE)
+                strcmp (diskInfo [i].fsType, "mfs") != 0
+                )
             {
                 addTotals (&diskInfo [i], &totals);
             }

Reply via email to