Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
6ed111f
clients/upsc.c: move usage() to top like in other clients [#3378]
jimklimov Mar 27, 2026
724ba4b
Clients and daemons with command-line options: converge to using geto…
jimklimov Mar 27, 2026
9ee23d2
clients/ups{c,cmd,rw}.c: converge to naming the help() method same wa…
jimklimov Mar 27, 2026
53a8e26
Clients and daemons with command-line options: converge to using opt_…
jimklimov Mar 27, 2026
5bcfc01
clients/ups{c,cmd,rw}.c, man pages, NEWS.adoc: add "-D" option suppor…
jimklimov Mar 27, 2026
6a1acba
NEWS.adoc: rephrase change about upsset [#3164]
jimklimov Mar 27, 2026
2499ec0
Makefile.am: add {all,check,install}-quick goals integrated with NUT …
jimklimov Mar 28, 2026
315e39b
Makefile.am, NEWS.adoc: Added `make .libs-dev-PATH` recipe to help de…
jimklimov Mar 28, 2026
fd80163
common/common.c, include/common.h: introduce xbasename_no_ext() to re…
jimklimov Mar 27, 2026
1949cb3
clients/upsmon.c: refactor with xbasename_no_ext() [#3373]
jimklimov Mar 27, 2026
1cd13c9
drivers/main.c: refactor with xbasename_no_ext() [#3373]
jimklimov Mar 27, 2026
b09dcf2
server/upsd.c: refactor with xbasename_no_ext() [#3373]
jimklimov Mar 27, 2026
2fedb98
drivers/main.c: define optstring near help_msg() to match other sourc…
jimklimov Mar 27, 2026
2192271
drivers/main.c: comment the complexity of many debug-level vars [#3378]
jimklimov Mar 27, 2026
d115b44
drivers/main.c: rename "drv_pipe_name" for maintainability (WIN32) [#…
jimklimov Mar 27, 2026
c027677
common/common.c, include/common.h: introduce xbasename_no_ext_default…
jimklimov Mar 27, 2026
8362709
Refactor various NUT programs to use getprogname_argv0_default(), and…
jimklimov Mar 27, 2026
9b5af3e
tools/nut-scanner/nut-scanner.c, tools/nut-scanner/Makefile.am: refac…
jimklimov Mar 27, 2026
6bd4768
tools/nutconf/nutconf-cli.cpp: refactor to use getprogname_argv0_defa…
jimklimov Mar 27, 2026
1caea03
common/nutstream.cpp: NutSocket::Address::Address() copier: sanity-ch…
jimklimov Mar 26, 2026
cd533a2
drivers/main.c: refactor to use getprogname_argv0_default(), get rid …
jimklimov Mar 27, 2026
9811e99
clients/upslog.c: handle "-D" option before others, so it can impact …
jimklimov Mar 27, 2026
d05efaa
tools/nut-scanner/*, docs/man/*: introduce nutscan_{g,s}et_debug_leve…
jimklimov Mar 27, 2026
a2dca60
tools/nut-scanner/nut-scanner.c: stop using nut_debug_level directly:…
jimklimov Mar 27, 2026
fed66e0
tools/nutconf/nutconf-cli.cpp, docs: support "-D" and `NUT_DEBUG_LEVE…
jimklimov Mar 27, 2026
60fedc7
clients/upsclient.{c,h}, docs: expose upscli_{g,s}etproctag() [#3379]
jimklimov Mar 27, 2026
f3ef790
tools/nut-scanner/*, docs: expose nutscan_{g,s}etproctag() [#3379]
jimklimov Mar 27, 2026
6e18069
tools/nut-scanner/nut-scanner.c: convert to using nutscan_setproctag(…
jimklimov Mar 27, 2026
9a19e3c
tools/nutconf/nutconf-cli.cpp: convert to using nutscan_setproctag() …
jimklimov Mar 27, 2026
17ed855
common/common.c, include/common.h: refactor with upslog_start_sync() …
jimklimov Mar 27, 2026
3295054
clients/upsclient.{c,h}, docs: expose upscli_upslog_start_sync() [#3378]
jimklimov Mar 27, 2026
578a370
tools/nut-scanner/*, docs: expose nutscan_upslog_start_sync() [#3378]
jimklimov Mar 27, 2026
4717ca5
tools/nutconf/nutconf-cli.cpp: init common timestamps with *upslog_st…
jimklimov Mar 27, 2026
37ac756
Introduce private setproctag_lib() for libupsclient and libnutscan [#…
jimklimov Mar 28, 2026
ef8582e
common/common.c: debug first run of setproctag() and runs of proctag_…
jimklimov Mar 28, 2026
abf3fb8
tools/nut-scanner/scan_nut.c: nutscan_upscli*(): avoid calls after li…
jimklimov Mar 28, 2026
32209a1
common/common.c: xbasename_no_ext(): keep or even add ext for "nut.ex…
jimklimov Mar 28, 2026
d3ea1ad
common/common.c: vupslog(): only warn about buffer realloc at high ve…
jimklimov Mar 28, 2026
2c350ac
common/common.c: ensure that proctag_cleanup() does its work before p…
jimklimov Mar 28, 2026
19ee993
tools/nut-scanner/nutscan-init.c: debug-log starting/ending of nutsca…
jimklimov Mar 29, 2026
1763001
common/common.c: vupslog(): handle reported invalid inputs for vsnpri…
jimklimov Mar 29, 2026
2b889a6
common/common.c: track procname_cleanup_registered; report what conte…
jimklimov Mar 29, 2026
6785626
common/common.c: debug-log registrations of atexit() handlers [#3384]
jimklimov Mar 29, 2026
6083a8c
tools/nutconf/nutconf-cli.cpp: limit calls to nutscan_* to builds WIT…
jimklimov Mar 29, 2026
d91f613
common/common.c: introduce nut_common_atexit() to clean-up once and i…
jimklimov Mar 29, 2026
106c0a5
tools/nutconf/nutconf-cli.cpp: hack for early enough nutscan_free() t…
jimklimov Mar 29, 2026
cfc6106
common/common.c: proctag_cleanup(): clarify in log messages if it is …
jimklimov Mar 29, 2026
f5d66bf
common/common.c: proctag_cleanup()/procname_cleanup(): simplify "star…
jimklimov Mar 29, 2026
29ad53e
drivers/main.c: fix preprocessor macro indentation of DRIVERS_MAIN_WI…
jimklimov Mar 29, 2026
d826e43
clients/*.c: for consumers of libupsclient, start with initialization…
jimklimov Mar 29, 2026
439a418
common/common.c: proctag_cleanup()/procname_cleanup(): log "finished"…
jimklimov Mar 29, 2026
19c888b
clients/upsc.c: revise main processing loop to setproctag(prog) once …
jimklimov Mar 29, 2026
271e266
NUT common code, libupsclient, libnutscan: expose setmyprocname() to …
jimklimov Mar 29, 2026
b774830
NUT consumers of libupsclient/libnutscan: call *_setprocname() early …
jimklimov Mar 29, 2026
afaa8d1
clients/*.c: redefine setproctag() to cover both in-program common co…
jimklimov Mar 29, 2026
e0179db
drivers/dummy-ups.c: as a libupsclient consumer, use upscli_upslog_st…
jimklimov Mar 29, 2026
29351e0
drivers/main.c: setproctag(prognames[0]) as soon as we can, so CLI/CO…
jimklimov Mar 29, 2026
671ab21
common/common.c: satisfy compilers where default char is signed [#3379]
jimklimov Mar 29, 2026
9c6278d
clients/*.c: diligently call upscli_cleanup() to minimize valgrind al…
jimklimov Mar 30, 2026
024a1ec
Rename libnutscan and libupsclient API methods related to logging wit…
jimklimov Mar 30, 2026
11ecd94
drivers/dummy-ups.c: diligently call upscli_cleanup() to minimize val…
jimklimov Mar 30, 2026
7e4b163
drivers/dummy-ups.c: fix upsdrv_tweak_prognames() to only set upscli …
jimklimov Mar 30, 2026
bb1e5a4
drivers/main.{c,h}, drivers/dummy-ups.c: introduce *upsdrv_callback_s…
jimklimov Mar 30, 2026
32510ab
tools/nutconf/nutconf-cli.cpp: fix NULL=>nullptr [#3379]
jimklimov Mar 30, 2026
989ead9
common/common.c: xbasename_no_ext(): use ubiquitous strcasecmp() for …
jimklimov Mar 31, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ tags
/VERSION_FORCED
/VERSION_FORCED_SEMVER
/install-sh
/.libs-dev-PATH
/libtool
/ltmain.sh
/missing
Expand Down
41 changes: 37 additions & 4 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@ SUBDIR_MAKE_VERBOSE = default

# Run the standard build if going sequential (or with unknown MAKEFLAGS),
# or fanout if parallel (presuming GNU/BSD/Sun make at least):
CLEANFILES += include/.all.nut_version-generated.timestamp clients/.all.libupsclient_version-generated.timestamp
all-fanout-maybe: @dotMAKE@
CLEANFILES += .libs-dev-PATH include/.all.nut_version-generated.timestamp clients/.all.libupsclient_version-generated.timestamp
all-fanout-maybe: .libs-dev-PATH @dotMAKE@
@rm -f include/.all.nut_version-generated.timestamp \
clients/.all.libupsclient_version-generated.timestamp
+@if [ x"$(NUT_MAKE_SKIP_FANOUT)" = xtrue ] ; then \
Expand All @@ -190,6 +190,27 @@ all-fanout-maybe: @dotMAKE@
;; \
esac

.libs-dev-PATH: Makefile
echo '# Sourcable script for developers to run built progs with their shared libs:' > '$@'
echo 'for D in common clients drivers tools/nut-scanner ; do \
for S in "" "/.libs" ; do \
DN="$(abs_top_builddir)/$${D}$${S}" ; \
case "$${PATH}" in \
"$${DN}"|*:"$${DN}}"|"$${DN}":*|*:"$${DN}":*) ;; \
"") PATH="$${DN}" ;; \
*) PATH="$${DN}:$${PATH}" ;; \
esac ; \
case "$${LD_LIBRARY_PATH}" in \
"$${DN}"|*:"$${DN}}"|"$${DN}":*|*:"$${DN}":*) ;; \
"") LD_LIBRARY_PATH="$${DN}" ;; \
*) LD_LIBRARY_PATH="$${DN}:$${LD_LIBRARY_PATH}" ;; \
esac ; \
done ; \
done ; \
export PATH ; \
export LD_LIBRARY_PATH ; \
' >> '$@'

# We start with a pass to `make all` in `common` dir because our wild recipes
# (with other subdirs ensuring the libraries they need have been built) can
# sometimes cause parallel compilation and library generation for same files
Expand All @@ -208,7 +229,7 @@ all-fanout-staged: @dotMAKE@

all-fanout-subdirs: $(SUBDIRS_ALL_RECURSIVE)

all-fanout-libs all-libs-local: $(SUBDIRS_ALL_LIBS_LOCAL)
all-fanout-libs all-libs-local: $(SUBDIRS_ALL_LIBS_LOCAL) .libs-dev-PATH

#all all-am-local all-local: @dotMAKE@
# +@cd common && $(MAKE) $(AM_MAKEFLAGS) all
Expand Down Expand Up @@ -855,9 +876,21 @@ SET_PARMAKES_OPT = \
;; \
esac

all-quick: @dotMAKE@
+@$(SET_PARMAKES_OPT); \
$(MAKE) $(AM_MAKEFLAGS) -k -s $${PARMAKES_OPT} all

install-quick: @dotMAKE@
+@$(SET_PARMAKES_OPT); \
$(MAKE) $(AM_MAKEFLAGS) -k -s $${PARMAKES_OPT} install

check-quick: @dotMAKE@
+@$(SET_PARMAKES_OPT); \
$(MAKE) $(AM_MAKEFLAGS) -k -s $${PARMAKES_OPT} check

spellcheck-quick: @dotMAKE@
+@$(SET_PARMAKES_OPT); \
$(MAKE) $(AM_MAKEFLAGS) -k -s ${PARMAKES_OPT} spellcheck
$(MAKE) $(AM_MAKEFLAGS) -k -s $${PARMAKES_OPT} spellcheck

# Run auto-parallel recipe, and if something fails - re-run interactively:
spellcheck-interactive-quick: @dotMAKE@
Expand Down
12 changes: 11 additions & 1 deletion NEWS.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,12 @@ but the `nutshutdown` script would bail out quickly and quietly. [PR #3008]
* Ported C client library `libupsclient` support logic for SSL connections
into C++ client library `libnutclient` and added tests for it. [issues
#1599, #1711, PR #3353]
* Added support for command-line debugging with `-D` option into `upsc`,
`upscmd` and `upsrw` command-line clients, and the `nutconf` tool.
Revised handling of `-D` and/or `NUT_DEBUG_LEVEL` environment variable
in other programs. Extended public API of libupsclient and libnutscan
to diligently arrange debug-logging when at run-time those libraries
actually have different copies of the methods and data involved. [#3378]

- NUT for Windows specific updates:
* Revised detection of (relative) paths to program and configuration files
Expand Down Expand Up @@ -395,7 +401,8 @@ several `FSD` notifications into one executed action. [PR #3097]

- `upsc` has now optional JSON output [issue #3172, PR #3178]

- `upsset` should now recognize `RANGE NUMBER` and `NUMBER` types. [#3164]
- `upsset` CGI tool should now recognize `RANGE NUMBER` and `NUMBER` types.
[#3164]

- `upsstats` CGI tool updates:
* Now has JSON output mode via `?json` (or `&json`) CGI query parameter.
Expand Down Expand Up @@ -540,6 +547,9 @@ several `FSD` notifications into one executed action. [PR #3097]
which should now not re-check source texts that were okay with the previous
dictionary contents, in case some new terms have to be added. [PRs #3186,
#2871]
* Added `make .libs-dev-PATH` recipe to generate a file which developers
or CI scripts can source to prefer freshly built NUT libraries and some
tools in their `LD_LIBRARY_PATH` and `PATH`. [#3379]
* Introduced `make distcheck-completeness` goal to verify that our
distribution archives can exactly reproduce themselves. [#2829]
* Added a GitHub Actions CI job to generate, upload and recycle `make dist`
Expand Down
2 changes: 1 addition & 1 deletion clients/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ endif WITH_SSL
# for the run-time dynamic linker resolution? For now the shared-library
# builds are "exotic", but it makes sense to deprecate this export in a
# future release.
libupsclient_la_LDFLAGS = -version-info 7:0:0
libupsclient_la_LDFLAGS = -version-info 8:0:1
libupsclient_la_LDFLAGS += -export-symbols-regex '^(upscli_|nut_debug_level)'
#|s_upsdebug|fatalx|fatal_with_errno|xcalloc|xbasename|print_banner_once)'
if HAVE_WINDOWS
Expand Down
123 changes: 82 additions & 41 deletions clients/upsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,30 +35,18 @@
/* network timeout for initial connection, in seconds */
#define UPSCLI_DEFAULT_CONNECT_TIMEOUT "10"

/* name-swap in libupsclient consumer to simplify the look of code base */
#define builtin_setproctag(x) setproctag(x)
#define setproctag(x) do { builtin_setproctag(x); upscli_upslog_setproctag(x, nut_common_cookie()); } while(0)

static char *upsname = NULL, *hostname = NULL;
static UPSCONN_t *ups = NULL;
static int output_json = 0;

static void fatalx_error_json_simple(int msg_is_simple, const char *msg)
__attribute__((noreturn));

static void fatalx_error_json_simple(int msg_is_simple, const char *msg) {
/* To be used in simpler cases, where the possible JSON
* message is not embedded into other lists/objects */
if (output_json) {
if (msg_is_simple) {
/* Caller knows there is nothing to escape here, pass through */
printf("{\"error\": \"%s\"}\n", NUT_STRARG(msg));
} else {
printf("{\"error\": \"");
json_print_esc(msg);
printf("\"}\n");
}
}
fatalx(EXIT_FAILURE, "Error: %s", NUT_STRARG(msg));
}
/* For getopt loops below: */
static const char optstring[] = "+DhlLcVW:j";

static void usage(const char *prog)
static void help(const char *prog)
{
print_banner_once(prog, 2);
printf("NUT read-only client program to display UPS variables.\n");
Expand Down Expand Up @@ -88,6 +76,7 @@ static void usage(const char *prog)
printf(" -V - display the version of this software\n");
printf(" -W <secs> - network timeout for initial connections (default: %s)\n",
UPSCLI_DEFAULT_CONNECT_TIMEOUT);
printf(" -D - raise debugging level\n");
printf(" -h - display this help text\n");

nut_report_config_flags();
Expand All @@ -96,6 +85,25 @@ static void usage(const char *prog)
printf("\n%s", suggest_doc_links(prog, NULL));
}

static void fatalx_error_json_simple(int msg_is_simple, const char *msg)
__attribute__((noreturn));

static void fatalx_error_json_simple(int msg_is_simple, const char *msg) {
/* To be used in simpler cases, where the possible JSON
* message is not embedded into other lists/objects */
if (output_json) {
if (msg_is_simple) {
/* Caller knows there is nothing to escape here, pass through */
printf("{\"error\": \"%s\"}\n", NUT_STRARG(msg));
} else {
printf("{\"error\": \"");
json_print_esc(msg);
printf("\"}\n");
}
}
fatalx(EXIT_FAILURE, "Error: %s", NUT_STRARG(msg));
}

static void printvar(const char *var)
{
int ret;
Expand Down Expand Up @@ -381,41 +389,72 @@ static void clean_exit(void)
free(hostname);
free(ups);

/* Not a sub-process (do not let common::proctag_cleanup() mis-report us as such) */
upscli_cleanup();

upsdebugx(1, "%s: finished, exiting", __func__);
setproctag(NULL);
}

int main(int argc, char **argv)
{
int i = 0;
/* Make sure all related logs (copies of code that may
* be spread in different NUT common libs) start on the
* same note; execute this call before everything else,
* at the cost of a temporary otherwise useless variable. */
const struct timeval *upslog_start_tmp = upscli_upslog_start_sync(upslog_start_sync(NULL), nut_common_cookie());
int opt_ret = 0;
uint16_t port;
int varlist = 0, clientlist = 0, verbose = 0;
const char *prog = xbasename(argv[0]);
const char *prog = getprogname_argv0_default(argc > 0 ? argv[0] : NULL, "upsc");
const char *net_connect_timeout = NULL;
char *s = NULL;

setproctag(prog);
/* NOTE: Caller must `export NUT_DEBUG_LEVEL` to see debugs for upsc
* and NUT methods called from it. This line aims to just initialize
* the subsystem, and set initial timestamp. Debugging the client is
* primarily of use to developers, so is not exposed via `-D` args.
NUT_UNUSED_VARIABLE(upslog_start_tmp);
upscli_upslog_setprocname(xstrdup(getmyprocname()), nut_common_cookie());

/* NOTE: Debugging the client is primarily of use to developers, so
* it was not at all exposed via `-D[D...]` args until NUT v2.8.5.
* Since earlier 2.8.x releases, caller could `export NUT_DEBUG_LEVEL`
* to see debugs for the client and for NUT methods called from it.
*/
s = getenv("NUT_DEBUG_LEVEL");
if (s && str_to_int(s, &i, 10) && i > 0) {
nut_debug_level = i;
upscli_set_debug_level(nut_debug_level);

/* Parse command line options -- First loop: only get debug level */
/* Suppress error messages, for now -- leave them to the second loop. */
opterr = 0;
while ((opt_ret = getopt(argc, argv, optstring)) != -1) {
if (opt_ret == 'D')
nut_debug_level++;
}

if (!nut_debug_level) {
char *s = getenv("NUT_DEBUG_LEVEL");
int l;
if (s && str_to_int(s, &l, 10) && l > 0) {
nut_debug_level = l;
upsdebugx(1, "Defaulting debug verbosity to NUT_DEBUG_LEVEL=%d "
"since none was requested by command-line options", l);
} /* else follow -D settings */
}

/* These lines aim to just initialize the logging subsystem, and set
* initial timestamp, for the eventuality that debugs would be printed:
*/
upscli_upslog_set_debug_level(nut_debug_level, nut_common_cookie());
setproctag(prog);
upsdebugx(1, "Starting NUT client: %s", prog);

#if (defined NUT_PLATFORM_AIX) && (defined ENABLE_SHARED_PRIVATE_LIBS) && ENABLE_SHARED_PRIVATE_LIBS
callback_upsconf_args = do_upsconf_args;
#endif

while ((i = getopt(argc, argv, "+hlLcVW:j")) != -1) {
/* Parse command line options -- Second loop: everything else */
/* Restore error messages... */
opterr = 1;
/* ...and index of the item to be processed by getopt(). */
optind = 1;
while ((opt_ret = getopt(argc, argv, optstring)) != -1) {

switch (i)
switch (opt_ret)
{
case 'D': break; /* See nut_debug_level handled above */
case 'L':
verbose = 1;
goto fallthrough_case_l;
Expand Down Expand Up @@ -445,7 +484,7 @@ int main(int argc, char **argv)

case 'h':
default:
usage(prog);
help(prog);
exit(EXIT_SUCCESS);
}
}
Expand All @@ -456,6 +495,8 @@ int main(int argc, char **argv)
fatalx_error_json_simple(0, msg);
}

/* Simplify offset numbering to look at command-line
* arguments (if any) after the options checked above */
argc -= optind;
argv += optind;

Expand All @@ -471,7 +512,7 @@ int main(int argc, char **argv)
fatalx_error_json_simple(0, "invalid UPS definition.\nRequired format: upsname[@hostname[:port]]");
}
}
setproctag(argv[0]);
setproctag(argv[0]); /* ups[@host[:port]] */
upsdebugx(1, "upsname='%s' hostname='%s' port='%" PRIu16 "'",
NUT_STRARG(upsname), NUT_STRARG(hostname), port);

Expand All @@ -484,15 +525,13 @@ int main(int argc, char **argv)
if (varlist) {
upsdebugx(1, "Calling list_upses()");
list_upses(verbose);
exit(EXIT_SUCCESS);
}

else
if (clientlist) {
upsdebugx(1, "Calling list_clients()");
list_clients(upsname);
exit(EXIT_SUCCESS);
}

else
if (argc > 1) {
upsdebugx(1, "Calling printvar(%s)", argv[1]);
printvar(argv[1]);
Expand All @@ -501,6 +540,8 @@ int main(int argc, char **argv)
list_vars();
}

/* Not a sub-process (do not let common::proctag_cleanup() mis-report us as such) */
setproctag(prog);
exit(EXIT_SUCCESS);
}

Expand Down
51 changes: 49 additions & 2 deletions clients/upsclient.c
Original file line number Diff line number Diff line change
Expand Up @@ -2272,12 +2272,59 @@ int upscli_str_add_unique_token(char *tgt, size_t tgtsize, const char *token,
* active memory, and upsdebugx() calls suffer if the library's copy
* is never changed from zero.
*/
void upscli_set_debug_level(int lvl)

/* privately exported from common.c for internal libs */
const char *setproctag_lib_once(const char *val);

const void *upscli_upslog_cookie(void)
{
return nut_common_cookie();
}

void upscli_upslog_set_debug_level(int lvl, const void *cookie)
{
nut_debug_level = lvl;

if (cookie == upscli_upslog_cookie())
return;

setproctag_lib_once("libupsclient");
}

int upscli_get_debug_level(void)
int upscli_upslog_get_debug_level(void)
{
return nut_debug_level;
}

/* Avoid re-querying /proc or equivalent and logging about it,
* if the caller is a NUT program that already knows its name:
* see getmyprocname() in NUT common library */
void upscli_upslog_setprocname(const char *pn, const void *cookie)
{
if (cookie != upscli_upslog_cookie())
setproctag_lib_once("libupsclient");

setmyprocname(pn);
}

void upscli_upslog_setproctag(const char *tag, const void *cookie)
{
if (cookie != upscli_upslog_cookie())
setproctag_lib_once("libupsclient");

setproctag(tag);
}

const char *upscli_upslog_getproctag(void)
{
return getproctag();
}

struct timeval *upscli_upslog_start_sync(struct timeval *tv, const void *cookie)
{
if (cookie != upscli_upslog_cookie())
setproctag_lib_once("libupsclient");

/* No-op if internal tv equals passed tv */
return upslog_start_sync(tv);
}
Loading
Loading