diff --git a/ChangeLog b/ChangeLog index 703d8f2a..043fc184 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +1999-12-22 Martin Baulig + + * glibtop.h (glibtop): Added `errno' field. + + * include/glibtop/errors.h + (GLIBTOP_ERROR_SERVER_COMM_FAILURE): New error constant. + (GLIBTOP_ERROR_NO_SUCH_PROCESS): New error constant. + 1999-12-19 Martin Baulig * include/glibtop/glib-arrays.h: New file. diff --git a/glibtop.h b/glibtop.h index 39e5b11f..729780a8 100644 --- a/glibtop.h +++ b/glibtop.h @@ -65,6 +65,7 @@ struct _glibtop glibtop_sysdeps required; /* Required feature list */ glibtop_sysdeps wanted; /* We only want this features */ glibtop_server_private *_priv; /* Private data */ + unsigned errno; }; extern glibtop *glibtop_global_server; diff --git a/include/glibtop/errors.h b/include/glibtop/errors.h index 62bd3c6c..048c6086 100644 --- a/include/glibtop/errors.h +++ b/include/glibtop/errors.h @@ -37,7 +37,11 @@ BEGIN_LIBGTOP_DECLS #define GLIBTOP_ERROR_READONLY_VALUE 4 #define GLIBTOP_ERROR_SIZE_MISMATCH 5 -#define GLIBTOP_MAX_ERROR 6 +#define GLIBTOP_ERROR_SERVER_COMM_FAILURE 6 + +#define GLIBTOP_ERROR_NO_SUCH_PROCESS 7 + +#define GLIBTOP_MAX_ERROR 8 char * glibtop_get_error_string_l (glibtop *server, unsigned error_number); diff --git a/lib/errors.c b/lib/errors.c index 6f73bd0c..ff4d420e 100644 --- a/lib/errors.c +++ b/lib/errors.c @@ -31,7 +31,9 @@ const char *glibtop_error_strings[GLIBTOP_MAX_ERROR] = { N_("Invalid argument"), N_("No such parameter"), N_("Attempted to modify a read-only value"), - N_("Parameter size mismatch") + N_("Parameter size mismatch"), + N_("Communication with LibGTop server failed"), + N_("No such process") }; char *