NODEUPDOWN_UP_COUNT(3)
β¨ NODEUPDOWN_UP_COUNT β¨
okay bestie, welcome to section 3 of the LIBNODEUPDOWN manual π this is the page for nodeupdown_up_count (and its partner in crime nodeupdown_down_count) β yes it's giving "two functions, one page" energy and honestly? iconic.
πΈ NAME πΈ
nodeupdown_up_count, nodeupdown_down_count β literally just return the number of nodes that are up or down π«Ά
π SYNOPSIS π
#include <nodeupdown.h>
int nodeupdown_up_count(nodeupdown_t handle);
int nodeupdown_down_count(nodeupdown_t handle);
π DESCRIPTION π
so nodeupdown_up_count() returns the number of nodes that are up. that's it. that's the whole vibe. β
and nodeupdown_down_count() returns the number of nodes that are down. bestie they are so symmetrical it hurts π
π₯ RETURN VALUES π₯
on success, nodeupdown_up_count() and nodeupdown_down_count() will return the number of up or down nodes respectively β slay, we love a return value that actually means something π
on error, both return -1, and an error code is returned in handle. the error code can be retrieved via nodeupdown_errnum(3), and a description of the error code can be retrieved via nodeupdown_strerror(3). error codes are defined in nodeupdown.h. no cap. π
π ERRORS π
not me having to tell you about the ways this can go wrong, but here we are π₯²
NODEUPDOWN_ERR_NULLHANDLEβ thehandleparameter isNULL. the nodeupdown handle must be created withnodeupdown_handle_create(3). it cannot be created by manifesting, bestie, you actually have to call the function πNODEUPDOWN_ERR_NOTLOADEDβnodeupdown_load_data(3)has not been called and no data has been retrieved. like, you can't count the vibes if you never checked the vibes, iykyk β¨NODEUPDOWN_ERR_MAGICβhandlehas an incorrect magic number.handledoes not point to a nodeupdown handle, orhandlehas been destroyed bynodeupdown_handle_destroy(3). rip to that handle fr fr πͺ¦
π¦ FILES π¦
/usr/include/nodeupdown.h
π SEE ALSO π
libnodeupdown(3), nodeupdown_handle_create(3), nodeupdown_load_data(3), nodeupdown_errnum(3), nodeupdown_strerror(3) β go read these too, they're part of the friend group πΈ
and that's the page bestie!! brought to you by LLNL, from way back in September 2003 (yes it predates your entire existence and it still serves π), for the NODEUPDOWN_UP_COUNT(3) page. go forth and count your nodes, you absolute main character πβ¨
π¦ where this page comes from
- epel 9: libnodeupdown-devel 1.14-41.el9 Β· GPLv2+
- fedora 43: libnodeupdown-devel 1.14-50.fc43 Β· GPL-2.0-or-later
- fedora 43: libnodeupdown-devel 1.14-50.fc43 Β· GPL-2.0-or-later
- fedora 44: libnodeupdown-devel 1.14-51.fc44 Β· GPL-2.0-or-later
- fedora 44: libnodeupdown-devel 1.14-51.fc44 Β· GPL-2.0-or-later
- Copyright (C) 2007-2011 Lawrence Livermore National Security, LLC
- Copyright (C) 2003-2007 The Regents of the University of California
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms