NODEUPDOWN_GE..._NODES_STRING(3)

๐Ÿ“ฆ version 1.14, in epel 9, fedora 43, fedora 44

๐Ÿ’– NODEUPDOWN_GE..._NODES_STRING(3) ๐Ÿ’–

okay bestie, so this is a libnodeupdown man page โ€” section 3, the library-calls girly. sit down, grab a strawberry, we're learning about grabbing node lists ๐Ÿ’…


โœจ NAME โœจ

nodeupdown_get_up_nodes_string, nodeupdown_get_down_nodes_string, โ€” get up or down nodes

like. the whole vibe is in the name fr fr. one of them gives you the up girlies, the other gives you the down ones ๐ŸŒˆ


๐ŸŒธ SYNOPSIS ๐ŸŒธ

#include <nodeupdown.h>

int nodeupdown_get_up_nodes_string(nodeupdown_t handle, char *buf, int
buflen);

int nodeupdown_get_down_nodes_string(nodeupdown_t handle, char *buf, int
buflen);

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

so nodeupdown_get_up_nodes_string() goes and gets you a ranged string of nodes that are up and gently places it into the buffer that buf is pointing at. iconic behaviour honestly. and buflen? that's you telling it how long the buffer is โ€” you have to tell it, it's not gonna guess ๐Ÿ”ฅ

and then nodeupdown_get_down_nodes_string() is literally the exact same thing, no cap, except it retrieves a ranged string of down nodes instead of up ones. same energy, different mood ๐Ÿ’€


๐Ÿ‘‘ RETURN VALUES ๐Ÿ‘‘

on success, 0 is returned โœจ slay.

on error, -1 is returned, and an error code is returned in handle. you can go get that error code with nodeupdown_errnum(3), and if you want an actual description of what that error code means (like, in words, bestie), that's nodeupdown_strerror(3). the error codes themselves are defined in nodeupdown.h ๐ŸŽ€


๐Ÿ’€ ERRORS ๐Ÿ’€

  • NODEUPDOWN_ERR_NULLHANDLE โ€” the handle parameter is NULL ๐Ÿ˜ญ the nodeupdown handle has to be created with nodeupdown_handle_create(3) first, you can't just show up with nothing.
  • NODEUPDOWN_ERR_NOTLOADED โ€” nodeupdown_load_data(3) has not been called and no data has been retrieved. like girl you didn't load anything, what did you expect ๐Ÿ™ˆ
  • NODEUPDOWN_ERR_PARAMETERS โ€” an incorrect parameter has been passed in. check ur args bestie.
  • NODEUPDOWN_ERR_OVERFLOW โ€” the buffer pointed to by buf is not large enough to store the ranged string of nodes. it's giving not enough room ๐Ÿ’… make the buffer bigger.
  • NODEUPDOWN_ERR_OUTMEM โ€” malloc(3) has failed internally. the memory said no ๐Ÿซถ
  • NODEUPDOWN_ERR_CLUSTERLIST_MODULE โ€” internal error with the clusterlist module.
  • NODEUPDOWN_ERR_HOSTLIST โ€” hostlist API has failed internally.
  • NODEUPDOWN_ERR_MAGIC โ€” handle has an incorrect magic number โœจ๐Ÿ”ฎ handle does not point to a nodeupdown handle, or handle has been destroyed by nodeupdown_handle_destroy(3). yes it's literally called a magic number, we love a mystical moment.

๐ŸŽ€ FILES ๐ŸŽ€

/usr/include/nodeupdown.h


โญ SEE ALSO โญ

libnodeupdown(3), nodeupdown_handle_create(3), nodeupdown_load_data(3), nodeupdown_get_up_nodes_list (3), nodeupdown_get_down_nodes_list (3), nodeupdown_errnum(3), nodeupdown_strerror(3)


lowkey important: if you're holding a buf that's too small you're getting NODEUPDOWN_ERR_OVERFLOW, so size it right the first time. no cap ๐Ÿ’–

and that's the whole page, bestie ๐Ÿซถ brought to you by LLNL, dating all the way back to August 2003 โ€” yes she's vintage, she's an icon, she's still serving. mwah ๐Ÿ’…โœจ

๐Ÿ“ฆ where this page comes from