New error constant.
2000-01-12 Martin Baulig <martin@home-of-linux.org> * include/glibtop/errors.h (GLIBTOP_ERROR_NO_BACKEND_OPENED): New error constant. * lib/lib.pl (glibtop_get_<feature>_l): Don't dump core when there is no backend opened, but return GLIBTOP_ERROR_NO_BACKEND_OPENED.
This commit is contained in:
committed by
Martin Baulig
parent
31067e703d
commit
7ba17b2bee
@@ -1,5 +1,11 @@
|
||||
2000-01-12 Martin Baulig <martin@home-of-linux.org>
|
||||
|
||||
* include/glibtop/errors.h (GLIBTOP_ERROR_NO_BACKEND_OPENED):
|
||||
New error constant.
|
||||
|
||||
* lib/lib.pl (glibtop_get_<feature>_l): Don't dump core when there
|
||||
is no backend opened, but return GLIBTOP_ERROR_NO_BACKEND_OPENED.
|
||||
|
||||
* include/glibtop/backend.h (glibtop_backend): Added `_priv_module'
|
||||
pointer (type glibtop_backend_module). Made the `info' field const
|
||||
since this now points to gmodule loaded memory
|
||||
|
||||
@@ -46,10 +46,11 @@ BEGIN_LIBGTOP_DECLS
|
||||
|
||||
#define GLIBTOP_ERROR_NO_SUCH_BACKEND 10
|
||||
#define GLIBTOP_ERROR_NOT_IMPLEMENTED 11
|
||||
#define GLIBTOP_ERROR_NO_BACKEND_OPENED 12
|
||||
|
||||
#define GLIBTOP_ERROR_DEMARSHAL_ERROR 12
|
||||
#define GLIBTOP_ERROR_DEMARSHAL_ERROR 13
|
||||
|
||||
#define GLIBTOP_MAX_ERROR 13
|
||||
#define GLIBTOP_MAX_ERROR 14
|
||||
|
||||
char *
|
||||
glibtop_get_error_string_l (glibtop *server, unsigned error_number);
|
||||
|
||||
@@ -158,6 +158,9 @@ sub output {
|
||||
}
|
||||
|
||||
$sysdeps_code = sprintf
|
||||
("\tif (!server->_priv)\n\treturn -GLIBTOP_ERROR_NO_BACKEND_OPENED;\n\n");
|
||||
|
||||
$sysdeps_code .= sprintf
|
||||
("\tfor (list = server->_priv->backend_list;\n\t list; list = list->next) {\n\t\tglibtop_backend *backend = list->data;\n\n\t\tif (!backend->info || !backend->info->call_vector)\n\t\t\tcontinue;\n\n\t\tif (backend->info->call_vector->%s) {\n", $feature);
|
||||
|
||||
if ($line_fields[3] eq '') {
|
||||
|
||||
Reference in New Issue
Block a user