From owner-freebsd-gnome@FreeBSD.ORG Tue Mar 30 14:48:13 2004 Return-Path: Delivered-To: freebsd-gnome@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9635116A4CE for ; Tue, 30 Mar 2004 14:48:13 -0800 (PST) Received: from creme-brulee.marcuscom.com (rrcs-midsouth-24-172-16-118.biz.rr.com [24.172.16.118]) by mx1.FreeBSD.org (Postfix) with ESMTP id EA70343D41 for ; Tue, 30 Mar 2004 14:48:12 -0800 (PST) (envelope-from marcus@marcuscom.com) Received: from [10.2.1.4] (vpn-client-4.marcuscom.com [10.2.1.4]) i2UMkvaX023924; Tue, 30 Mar 2004 17:46:57 -0500 (EST) (envelope-from marcus@marcuscom.com) From: Joe Marcus Clarke To: Franz Klammer In-Reply-To: <4069F0A2.7040706@webonaut.com> References: <4069F0A2.7040706@webonaut.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-fL5Z+yJ5iGleSm4UA18z" Organization: MarcusCom, Inc. Message-Id: <1080686927.792.69.camel@gyros> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Tue, 30 Mar 2004 17:48:47 -0500 X-Spam-Status: No, hits=-4.9 required=5.0 tests=BAYES_00 autolearn=ham version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on creme-brulee.marcuscom.com cc: FreeBSD GNOME Users Subject: Re: gdesklets - calculation of disksize X-BeenThere: freebsd-gnome@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: GNOME for FreeBSD -- porting and maintaining List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Mar 2004 22:48:13 -0000 --=-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--