CMAP_DEC(3)
π NAME π
cmap_inc β Decrease already stored value in CMAP
(yes bestie, the name says cmap_inc and the description says decrease, we don't make the rules, we just report them faithfully π«Ά)
β¨ SYNOPSIS β¨
#include <corosync/cmap.h>
cs_error_t cmap_dec (cmap_handle_t handle, const char *key_name);
πΈ DESCRIPTION πΈ
okay so the cmap_dec function is here to decrease the integer value of a key that's already stored inside cmap. Like, the key has to exist first, we're not creating anything, we're just nudging a number down. no cap.
- the
handleargument is your connection to the CMAP database, and you get it by callingcmap_initialize(3)π key_nameis the name of the key whose value you wanna increase (yes, the manpage literally says "increase" there, and honestly? iconic. we keep it exactly as written π)
This function is defined only on values where increasing makes sense and is well defined, so it can be one of:
CMAP_VALUETYPE_INT8β 8-bit signed integerCMAP_VALUETYPE_UINT8β 8-bit unsigned integerCMAP_VALUETYPE_INT16β 16-bit signed integerCMAP_VALUETYPE_UINT16β 16-bit unsigned integerCMAP_VALUETYPE_INT32β 32-bit signed integerCMAP_VALUETYPE_UINT32β 32-bit unsigned integerCMAP_VALUETYPE_INT64β 64-bit signed integerCMAP_VALUETYPE_UINT64β 64-bit unsigned integer
π Overflow/underflow is not detected and it's ignored. so like, be aware. she's not checking your math, she's just vibing.
β RETURN VALUE β
This call returns the CS_OK value if successful, periodt. β¨
But if value or key_name are unspecified, you get CS_ERR_INVALID_PARAM back. π
CS_ERR_NOT_EXIST error is returned if the key doesn't exist β which means it wasn't created by calling cmap_set(3) first. so like, you gotta set it up before you can decrement it, bestie.
Also, some of keys may be tagged read-only directly in corosync, and setting such a key will result in a CS_ERR_ACCESS error. π not her fault, she's just locked.
π SEE ALSO π
and the whole error-girlie lineup:
CS_ERR_TRY_AGAINβ Resource temporarily unavailableCS_ERR_INVALID_PARAMβ Invalid argumentCS_ERR_ACCESSβ Permission deniedCS_ERR_LIBRARYβ The connection failedCS_ERR_INTERRUPTβ System call interrupted by a signalCS_ERR_NOT_SUPPORTEDβ The requested protocol/functionality not supportedCS_ERR_MESSAGE_ERRORβ Incorrect auth message receivedCS_ERR_NO_MEMORYβ Not enough memory to complete the requested task
and that's the whole page, bestie!! π¦ this was the corosync Man Page, dated 03/02/2012, filed under CMAP_DEC(3) β go forth and decrement responsibly, mwah π π
π¦ where this page comes from
- debian bookworm: libcmap-dev 3.1.7-1+deb12u2 Β· BSD-3-Clause
- debian trixie: libcmap-dev 3.1.9-2+deb13u1 Β· BSD-3-Clause
- epel 9: corosynclib-devel 3.1.10-0.2.el9.1 Β· BSD-3-Clause
- fedora 43: corosynclib-devel 3.1.10-3.fc43 Β· BSD-3-Clause
- fedora 43: corosynclib-devel 3.1.10-3.fc43 Β· BSD-3-Clause
- fedora 43: corosynclib-devel 3.1.9-5.fc43 Β· BSD-3-Clause
- fedora 43: corosynclib-devel 3.1.9-5.fc43 Β· BSD-3-Clause
- fedora 44: corosynclib-devel 3.1.10-4.fc44 Β· BSD-3-Clause
- fedora 44: corosynclib-devel 3.1.10-4.fc44 Β· BSD-3-Clause
- fedora 44: corosynclib-devel 3.1.10-6.fc44 Β· BSD-3-Clause
- fedora 44: corosynclib-devel 3.1.10-6.fc44 Β· BSD-3-Clause
- nixos 26.05: corosync 3.1.9
- nixpkgs unstable: corosync 3.1.9
- opensuse-leap 16.0: corosync-devel 3.1.9-160000.4.1 Β· BSD-3-Clause
- opensuse-leap 16.0: corosync-devel 3.1.9-160000.4.1 Β· BSD-3-Clause
- opensuse-leap 16.0: corosync-devel 3.1.9-160000.4.1 Β· BSD-3-Clause
- opensuse-leap 16.0: corosync-devel 3.1.9-160000.4.1 Β· BSD-3-Clause
- ubuntu jammy: libcmap-dev 3.1.6-1ubuntu1 Β· BSD-3-Clause
- ubuntu jammy: libcmap-dev 3.1.6-1ubuntu1.2 Β· BSD-3-Clause
- ubuntu noble: libcmap-dev 3.1.7-1ubuntu3 Β· BSD-3-Clause
- ubuntu noble: libcmap-dev 3.1.7-1ubuntu3.2 Β· BSD-3-Clause
- ubuntu questing: libcmap-dev 3.1.9-2ubuntu1
- ubuntu questing: libcmap-dev 3.1.9-2ubuntu1.1
- ubuntu resolute: libcmap-dev 3.1.9-2ubuntu3 Β· BSD-3-Clause
- ubuntu stonking: libcmap-dev 3.1.10-3ubuntu1 Β· BSD-3-Clause
- Copyright (c) 2012 Red Hat, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms