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
@@ -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