QB_LIST_ADD(3)
π QB_LIST_ADD β bestie edition π
okay so we're doing qb_list_add(3) from the libqb Programmer's Manual, and honestly? it's giving humble little workhorse. π
it adds a thing to a list. that's the whole gig. iconic behaviour, no notes.
β¨ NAME β¨
qb_list_add β add this element to the list. π«Ά
β¨ SYNOPSIS β¨
#include <qb/qblist.h>
static void qb_list_add(
struct qb_list_head *element, /* the new element to insert. */
struct qb_list_head *head /* pointer to the list head */
);
so yeah, you pull in qb/qblist.h, and then qb_list_add() takes two pointers and returns absolutely nothing (void, she's mysterious, she's low maintenance π).
β¨ PARAMS β¨
elementβ the new element to insert. this is the baby you're yeeting into the list. πΈheadβ pointer to the list head. this is the β¨main characterβ¨ β the anchor point you're attaching everything to.
β¨ DESCRIPTION β¨
ngl bestieβ¦ there's literally nothing here in the original. the DESCRIPTION section is empty. fr fr. no lore, no extra tea. π
what we do know lives in the NAME, PARAMS and SYNOPSIS above: this function adds your element to the list headed by head. that's it, that's the vibe check, and it passed. π
β¨ STRUCTURES β¨
here's the struct you're working with, and yes, we are copying it exactly as-is, no editing, no "fixing," hands off the keyboard bestie:
struct qb_list_head {
struct next;
struct prev;
};
struct qb_list_head is giving linked-list-node energy: it's got a next and a prev, so your elements know their neighbours on both sides. π¦
β¨ SEE ALSO β¨
the whole friend group, go say hi π:
qb_list_empty(3)qb_list_add_tail(3)qb_list_splice_tail(3)qb_list_length(3)qb_list_replace(3)qb_list_init(3)qb_list_splice(3)qb_list_is_last(3)qb_list_del(3)
β¨ COPYRIGHT β¨
Copyright (C) 2010-2020 Red Hat, Inc.
that's the legal bit, and we respect it. π
and that's a wrap on the libqb page, dated 2025-09-16, brought to you by LIBQB β QB_LIST_ADD(3) out. slay, stay safe, and always init your lists before you add to them ππ§β¨
π¦ where this page comes from
- fedora 44: libqb-devel 2.0.9-2.fc44 Β· LGPL-2.1-or-later
- fedora 44: libqb-devel 2.0.9-2.fc44 Β· LGPL-2.1-or-later
- ubuntu resolute: libqb-dev 2.0.9-1ubuntu1 Β· LGPL-2.1-or-later
- ubuntu stonking: libqb-dev 2.0.9-1ubuntu1 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms