1UPSCLI_UPSERROR(3)                NUT Manual                UPSCLI_UPSERROR(3)
2
3
4

NAME

6       upscli_upserror - Get current error number for connection
7

SYNOPSIS

9       #include <upsclient.h>
10
11       int upscli_upserror(UPSCONN_t *ups);
12

DESCRIPTION

14       The upscli_upserror() function takes the pointer ups to a UPSCONN_t
15       state structure and returns the value of the internal error number, if
16       any.
17
18       This is typically used to check for certain error values like
19       UPSCLI_ERR_UNKCOMMAND. That specific error can be used for detecting
20       older versions of upsd(8) which might not support a given command.
21
22       Some error messages have additional meanings, so you should use
23       upscli_strerror(3) to obtain readable error messages.
24

RETURN VALUE

26       The upscli_upserror() function returns one of the UPSCLI_ERR_* values
27       from upsclient.h, or 0 if no error has occurred.
28

SEE ALSO

30       upscli_readline(3), upscli_sendline(3), upscli_strerror(3)
31
32
33
34Network UPS Tools 2.8.0           04/26/2022                UPSCLI_UPSERROR(3)
Impressum