Le jeudi 30 juin 2005 à 11:16 +0200, Alexander Larsson a écrit :
> On Wed, 2005-06-29 at 12:00 -0400, David Zeuthen wrote:
> * Does this work with any version of libhal, or should we update the
> libhal version requirement?
>
> +static char *
> +_hal_size_as_string (gint64 size)
> +{
> ....
> + char* sizes_str[] = {"K", "M", "G", "T", NULL};
> + gint64 cur = 1000L;
> + gint64 base = 10L;
> + gint64 step = 10L*10L*10L;
> + int cur_str = 0;
>
> Gnome in general, and gnome-vfs in particular uses 1024 for disk sizes.
> Actually, this code should probably just use the function:
> gchar* gnome_vfs_format_file_size_for_display (GnomeVFSFileSize size)
HAL is plain right and uses SI prefixes. gnomevfs is wrong. See
http://bugzilla.gnome.org/show_bug.cgi?id=301838.
--
Benoît Dejean <TazForEver AT dlfp DOT org>
JID: TazForEver jabber org
GNOME http://www.gnomefr.org/
LibGTop http://directory.fsf.org/libgtop.html
Attachment:
signature.asc
Description: This is a digitally signed message part