Commit Graph

33 Commits

Author SHA1 Message Date
Jasper Lievisse Adriaanse
93829c8cbb Fix filesystem read/write accounting on OpenBSD
https://bugzilla.gnome.org/show_bug.cgi?id=652980
2011-06-22 17:24:37 +02:00
Benoît Dejean
65fe248d66 Got rid of G_GNUC_INTERNAL.
svn path=/trunk/; revision=2600
2007-05-31 20:04:32 +00:00
Benoît Dejean
a085c85db6 Make sure avail <= free. Closes #406280.
2007-02-10  Benoît Dejean  <benoit@placenet.org>

	* fsusage.c: (glibtop_get_fsusage_s):
	
	Make sure avail <= free.
	Closes #406280.

svn path=/trunk/; revision=2551
2007-02-10 15:33:09 +00:00
Benoît Dejean
fc7d872381 * Add support for file system read and write counting (needed for the disk
* fsusage.c: * Add support for file system read and write counting
	(needed for the disk load feature of the multiload applet).
2005-02-28 08:11:15 +00:00
Benoît Dejean
f031b77b3b Correct file system size calculations. Patch from marcus@freebsd.org (Joe
* fsusage.c: (glibtop_get_fsusage_s): Correct file system size calculations.
	Patch from marcus@freebsd.org (Joe Marcus Clarke).
	Closes #168232.
2005-02-23 08:18:48 +00:00
Benoît Dejean
bbbbb27edc Fixed G_GNUC attribute usage. Replaced macro by inline function.
* fsusage.c: (_glibtop_get_fsusage_read_write): Fixed G_GNUC attribute usage.
	Replaced macro by inline function.
2005-02-15 09:51:59 +00:00
Benoît Dejean
ce9ce223ca Turned all macros to functions. Marked everything as G_GNUC_PRINTF and
* include/glibtop/error.h:
	* lib/parameter.c: (glibtop_set_parameter_l):
	* lib/read_data.c: (glibtop_read_data_l):
	* sysdeps/common/error.c: (print_server_name), (glibtop_error_vr),
	(glibtop_error_io_vr), (glibtop_warn_vr), (glibtop_warn_io_vr),
	(glibtop_error_r), (glibtop_warn_r), (glibtop_error_io_r),
	(glibtop_warn_io_r), (glibtop_error), (glibtop_warn),
	(glibtop_error_io), (glibtop_warn_io): Turned all macros to functions.
	Marked everything as G_GNUC_PRINTF and fixed format bugs.

	* sysdeps/common/fsusage.c: Marked some functions as G_GNUC_INTERNAL
2004-12-23 21:50:41 +00:00
Benoît Dejean
d0833edb66 Fixed .block_size on Solaris.
* fsusage.c: (glibtop_get_fsusage_s): Fixed .block_size on Solaris.
2004-09-24 21:26:34 +00:00
Benoît Dejean
5d97c3fa5e Linux: Sanitize. Removed calls to obfuscated PROPAGATE_ALL_ONES(x) which
* fsusage.c: (glibtop_get_fsusage_s): Linux: Sanitize. Removed calls
        to obfuscated PROPAGATE_ALL_ONES(x) which seems to return unpredictable
        values on some arch (e.g sparc).
        Closes #153141.
2004-09-22 17:38:18 +00:00
Benoît Dejean
0b0b1ab43c Back to previous version.
* fsusage.c: (_glibtop_get_fsusage_read_write),
	(glibtop_get_fsusage_s):
	* mountlist.c: (glibtop_get_mountlist_s): Back to previous version.

	* fsusage.c: (linux_2_6_0), (linux_2_4_0),
	(_glibtop_linux_get_fsusage_read_write): Back to previous version.
	Now set .flags correctly.
2004-09-20 23:43:24 +00:00
Benoît Dejean
601cfef32f : Added new flag. (_glibtop_get_fsusage_read_write): Changed prototype.
* fsusage.c: (_glibtop_get_fsusage_read_write) : Added new flag.
	(_glibtop_get_fsusage_read_write): Changed prototype. Returns TRUE on
	success, then _glibtop_get_fsusage_read_write is set.

	Added comment to locate Linux code.

	* mountlist.c: (read_filesystem_list): Dropped unused need_fs_type parameter.
	This is now default.
	Fixed possible leak.

	(ignore_mount_entry): Added "usbfs" to ignored FS.

	(glibtop_get_mountlist_s): Updated.
2004-09-19 21:02:10 +00:00
Benoît Dejean
35488aef90 bumped to 2.8.1.
* configure.in: bumped to 2.8.1.

	* sysdeps/common/fsusage.c:
	* sysdeps/common/gnuslib.c: (glibtop_make_connection),
	(connect_to_unix_server), (glibtop_internet_addr):
	* sysdeps/linux/glibtop_server.c: (get_pageshift):
	* sysdeps/linux/glibtop_server.h:
	* sysdeps/linux/open.c: (glibtop_open_s):
	* sysdeps/linux/ppp.c: (is_ISDN_on): Cleanups. Thanks to Kjartan Maraas.
	Closes #151557.
2004-09-13 15:21:54 +00:00
Benoît Dejean
bce095739f Added -gnu89 to CFLAGS.
* configure.in: Added -gnu89 to CFLAGS.

	* examples/Makefile.am: Fixed LDFLAGS.

	* sysdeps/common/fsusage.c: (glibtop_get_fsusage_s):
	* sysdeps/linux/fsusage.c: (linux_2_6_0):
	* sysdeps/linux/proctime.c: (glibtop_get_proc_time_s):
	* sysdeps/linux/sysinfo.c: (init_sysinfo): Fixed C89 issues.

	Closes #149375.
2004-08-09 07:55:50 +00:00
Benoît Dejean
e5a855db7c Started implementation of read, write. Code should be splitted into arch
* fsusage.c: (glibtop_get_fsusage_s): Started implementation of read, write.
	Code should be splitted into arch specific files.

	* mountlist.c: (glibtop_get_mountlist_s): glibify. Used GArray.
2004-07-17 12:04:09 +00:00
Benoît Dejean
f03e2d3c11 Removed files.
* Makefile.am:
	* fsusage-frontend.c:
	* fsusage.h: Removed files.

	* fsusage.c: (glibtop_get_fsusage_s), (statfs): Merged and cleaned.
2004-06-12 15:37:44 +00:00
Bastien Nocera
2b221cbb1f set GLIBTOP_MAX_FSUSAGE properly, use gint in the headers instead of int
2004-03-15  Bastien Nocera  <hadess@hadess.net>

	* include/glibtop/fsusage.h: set GLIBTOP_MAX_FSUSAGE properly,
	use gint in the headers instead of int (Closes: #125049)


2004-03-15  Bastien Nocera  <hadess@hadess.net>

	* fsusage.c:
	* fsusage.h: remove use of uintmax_t
2004-03-16 10:10:41 +00:00
Bastien Nocera
ab1d1077d6 fix build (we don't have "full-read.h" here)
2004-03-09  Bastien Nocera  <hadess@hadess.net>

	* fsusage.c: fix build (we don't have "full-read.h" here)
2004-03-09 23:32:08 +00:00
Ole Laursen
897db07104 Added block_size field. (Closes: #125049)
2003-12-27  Ole Laursen  <olau@hardworking.dk>

	* include/glibtop/fsusage.h: Added block_size field. (Closes: #125049)
2004-03-09 23:28:48 +00:00
Bastien Nocera
b2283f7c79 - s/u_int64_t/guint64/ 2003-10-20 20:12:28 +00:00
Carlos Perelló Marín
bae16b467f libgtop-GNOME-2-0-branch moved to HEAD.
2003-10-19  Carlos Perelló Marín <carlos@gnome.org>

	* libgtop-GNOME-2-0-branch moved to HEAD.
2003-10-19 16:10:39 +00:00
Martin Baulig
236d2b18e7 Install this as a backend.
2001-04-21  Martin Baulig  <baulig@suse.de>

	* Makefile.am: Install this as a backend.

	* libgtop-common.backend, backend.c: New files.

	* inodedb.c: Removed; moved to ~/lib.
2001-04-20 22:31:26 +00:00
Martin Baulig
81b009733e Don't call glibtop_init_s() anymore, this is deprecated.
2000-11-22  Martin Baulig  <martin@home-of-linux.org>

	* fsusage.c, moutlist.c: Don't call glibtop_init_s() anymore,
	this is deprecated.

	* Makefile.am: Don't install libgtop_common.la
2000-11-22 19:55:29 +00:00
Martin Baulig
752d5b47d2 Started with the big rewrite for GNOME 2.0:
2000-11-20  Martin Baulig  <baulig@suse.de>

	Started with the big rewrite for GNOME 2.0:

	- split the `glibtop' structure into `glibtop_server' and
	`glibtop_client' and make `glibtop_client' a GObject.
	- cleanly separate the library and the backends.

	This stuff currently does not compile.

	* glibtop.h (glibtop_server_private, glibtop_server_info):
	Removed typedefs.
	(struct _glibtop, struct _glibtop_server_info): Removed.
	(glibtop_global_server, glibtop_server_features): Removed.
	(glibtop_server_ref, glibtop_server_unref): Removed.

	* glibtop.h (glibtop_init_s): First argument is now a
	`glibtop_server *'.

	* include/glibtop/*.h: Removed all #defines with the
	glibtop_global_server.
	(glibtop_get_*_l): First argument is now a `glibtop_client *'.
	(glibtop_get_*_s, glibtop_init_*_s): First argument is now a
	`glibtop_server *'.

	* lib/glibtop-client.c: New file.

	* sysdeps/common/xmalloc.c: Moved to lib/.
	* sysdeps/common/error.c: Moved to lib/.

	* lib/xmalloc.c: Moved here from sysdeps/common/.
	* lib/error.c: Moved here from sysdeps/common/.

	* include/glibtop/backend.h
	(glibtop_backend_open_func_t, glibtop_backend_close_func_t):
	First argument is now a `glibtop_server *'.
	(glibtop_backend_info): Added `glibtop_server *server'.
	(glibtop_open_backend_l): Returns `glibtop_backend *', first
	argument is `glibtop_client *' and added `GError **'.

	* include/glibtop/close.h (glibtop_close_s, glibtop_close_p):
	First argument is now a `glibtop_server *'.

	* include/glibtop/error.h (*):
	First argument is now a `glibtop_server *'.

	* include/glibtop/errors.h: Switched this to use GError.
2000-11-20 22:37:15 +00:00
Martin Baulig
d6a6d70c75 True64 fix from Aron Griffis: we need to `#include <sys/bitypes.h>' here.
2000-02-24  Martin Baulig  <martin@home-of-linux.org>

	* fsusage.c: True64 fix from Aron Griffis: we need to
	`#include <sys/bitypes.h>' here.
2000-02-24 12:43:20 +00:00
Martin Baulig
8da7cfd032 Use `u_int64_t' arguments and return value to avoid long int overflows on
2000-01-20  Martin Baulig  <martin@home-of-linux.org>

	* fsusage.c (adjust_blocks): Use `u_int64_t' arguments and
	return value to avoid long int overflows on machines with large
	disks.

	* fsusage.h (struct fs_usage): Use `u_int64_t' here as well.
2000-01-20 21:42:24 +00:00
Martin Baulig
f1a6e1ead8 The indentation in LibGTop was done with the following command:
find . -name \*.[ch] | xargs -i emacs -batch {} \
		-l /gnome/compile/libgtop/misc/format.el -f save-buffer

December 26, 1999
Martin
1999-12-26 14:05:32 +00:00
Martin Baulig
2dc529b19f New static variable. (glibtop_get_fsusage_s): Return -1 on error;
1999-10-24  Martin Baulig  <martin@home-of-linux.org>

	* fsusage.c (_glibtop_sysdeps_fsusage): New static variable.
	(glibtop_get_fsusage_s): Return -1 on error; otherwise set the
	features and return 0.
1999-10-24 19:16:52 +00:00
Martin Baulig
a5dd7e9063 This is a very big an possibly breaking commit.
It changes the return values of all sysdeps functions which were
previosly returning void to int.

This is the first step to implement better error handling in LibGTop.

Martin

1999-10-24  Martin Baulig  <martin@home-of-linux.org>

	* include/glibtop/*.h (glibtop_get_*, glibtop_init*): Changed
	the return value of all `glibtop_get_<feature>_* ()' and all
 	`glibtop_init_<feature>_* ()' functions from void to int.

	* features.def: Reflect changes of the return values.
	* sysdeps/*/*.c: Reflect changes of the return values.
1999-10-24 19:09:32 +00:00
Martin Baulig
69fed8d42d Use glib-like function prototypes instead of "extern <function>
1999-02-18  Martin Baulig  <martin@home-of-linux.org>

	* include/glibtop/*.h: Use glib-like function prototypes
	instead of "extern <function> __P((args))".
1999-02-18 20:39:37 +00:00
Martin Baulig
cf0e724f7d Removed G_GNUC_UNUSED. 1998-10-06 09:04:27 +00:00
Martin Baulig
dfda639756 G_GNUC_UNUSED fun and other compiler warnings ... 1998-10-03 03:19:09 +00:00
Martin Baulig
954a78f200 New file.
1998-07-22  Martin Baulig  <martin@home-of-linux.org>

	* include/glibtop/fsusage.h: New file.

	* features.def: Added new feature `fsusage'.

	* sysdeps/common/fsusage.c (glibtop_get_fsusage_s): New function.
	(get_fs_usage): Declared as `static'.

	* sysdeps/names/fsusage.c: New file.
1998-07-22 22:56:09 +00:00
Martin Baulig
15cc0113a9 Initial revision 1998-07-06 22:44:40 +00:00