Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Mar 2004 17:48:47 -0500
From:      Joe Marcus Clarke <marcus@marcuscom.com>
To:        Franz Klammer <klammer@webonaut.com>
Cc:        FreeBSD GNOME Users <gnome@freebsd.org>
Subject:   Re: gdesklets - calculation of disksize
Message-ID:  <1080686927.792.69.camel@gyros>
In-Reply-To: <4069F0A2.7040706@webonaut.com>
References:  <4069F0A2.7040706@webonaut.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--=-fL5Z+yJ5iGleSm4UA18z
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

On Tue, 2004-03-30 at 17:11, Franz Klammer wrote:
> question to the knowing people:
>=20
> gdesklets didn't calculate the correct disk size returned from glibtop.
> i had to change the following lines (excerpt from a diff):
>=20
> -        free =3D float(bfree * 512)
> -        total =3D float(blocks * 512)
> +        free =3D float(bfree * 2048)
> +        total =3D float(blocks * 2048)
> =20
> my questions:
> - is this only necessary on -CURRENT?
> - if yes: from which version upwards i should check?

On -CURRENT, we have statvfs, but there are parts of the GNOME code that
don't use it right.  This is why you were seeing weird values in
nautilus previously.  Places where statvfs is used need to be modified
to use the f_frsize member for block size, and f_bavail for available
blocks.

In this case, you also need to make sure that the value given to you
from libgtop2 is using f_blocks and f_bfree.  Then, multiply those
values by whatever you get for f_frsize.

Joe

>=20
> franz
>=20
> _______________________________________________
> freebsd-gnome@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-gnome
> To unsubscribe, send any mail to "freebsd-gnome-unsubscribe@freebsd.org"
--=20
PGP Key : http://www.marcuscom.com/pgp.asc



--=-fL5Z+yJ5iGleSm4UA18z
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (FreeBSD)

iD8DBQBAaflPb2iPiv4Uz4cRAttZAJ4z7qPLEhKbsVIsv8yQFsc3575BkwCfbL7I
D1lGCP8DUzS32C7eAB38LwE=
=NAPs
-----END PGP SIGNATURE-----

--=-fL5Z+yJ5iGleSm4UA18z--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1080686927.792.69.camel>