New global function to return `server->glibtop_errno'.
1999-12-22 Martin Baulig <martin@home-of-linux.org> * lib/errors.c (glibtop_get_errno_l): New global function to return `server->glibtop_errno'. (glibtop_clear_errno_l): New global function to return `server->glibtop_errno' and set it back to 0.
This commit is contained in:
committed by
Martin Baulig
parent
ac0cce9d6f
commit
d0441219cb
15
ChangeLog
15
ChangeLog
@@ -1,23 +1,22 @@
|
|||||||
1999-12-22 Martin Baulig <martin@home-of-linux.org>
|
1999-12-22 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
|
* lib/errors.c (glibtop_get_errno_l): New global function
|
||||||
|
to return `server->glibtop_errno'.
|
||||||
|
(glibtop_clear_errno_l): New global function to return
|
||||||
|
`server->glibtop_errno' and set it back to 0.
|
||||||
|
|
||||||
* include/glibtop/errors.h
|
* include/glibtop/errors.h
|
||||||
|
(GLIBTOP_ERROR_SERVER_COMM_FAILURE): New error constant.
|
||||||
|
(GLIBTOP_ERROR_NO_SUCH_PROCESS): New error constant.
|
||||||
(GLIBTOP_ERROR_NO_KERNEL_SUPPORT): New error constant.
|
(GLIBTOP_ERROR_NO_KERNEL_SUPPORT): New error constant.
|
||||||
(GLIBTOP_ERROR_INCOMPATIBLE_KERNEL): New error constant.
|
(GLIBTOP_ERROR_INCOMPATIBLE_KERNEL): New error constant.
|
||||||
|
|
||||||
* lib/errors.c (glibtop_get_errno_l): New global function.
|
|
||||||
|
|
||||||
* lib/lib.pl: For functions with a `retval' return type, set
|
* lib/lib.pl: For functions with a `retval' return type, set
|
||||||
`server->glibtop_errno' to the error code on error or to zero
|
`server->glibtop_errno' to the error code on error or to zero
|
||||||
on success.
|
on success.
|
||||||
|
|
||||||
1999-12-22 Martin Baulig <martin@home-of-linux.org>
|
|
||||||
|
|
||||||
* glibtop.h (glibtop): Added `glibtop_errno' field.
|
* glibtop.h (glibtop): Added `glibtop_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 <martin@home-of-linux.org>
|
1999-12-19 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
* include/glibtop/glib-arrays.h: New file.
|
* include/glibtop/glib-arrays.h: New file.
|
||||||
|
@@ -52,6 +52,9 @@ glibtop_get_error_string_l (glibtop *server, unsigned error_number);
|
|||||||
unsigned
|
unsigned
|
||||||
glibtop_get_errno_l (glibtop *server);
|
glibtop_get_errno_l (glibtop *server);
|
||||||
|
|
||||||
|
unsigned
|
||||||
|
glibtop_clear_errno_l (glibtop *server);
|
||||||
|
|
||||||
END_LIBGTOP_DECLS
|
END_LIBGTOP_DECLS
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
10
lib/errors.c
10
lib/errors.c
@@ -52,3 +52,13 @@ glibtop_get_errno_l (glibtop *server)
|
|||||||
{
|
{
|
||||||
return server->glibtop_errno;
|
return server->glibtop_errno;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unsigned
|
||||||
|
glibtop_clear_errno_l (glibtop *server)
|
||||||
|
{
|
||||||
|
unsigned old_errno;
|
||||||
|
|
||||||
|
old_errno = server->glibtop_errno;
|
||||||
|
server->glibtop_errno = 0;
|
||||||
|
return old_errno;
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user