UUID_COMPARE(3)
π UUID_COMPARE(3) β the libuuid girlies' comparison era
okay bestie, so this is a page from the Programmers Manual and it's literally about uuid_compare, which β true story β is the function that tells you whether two UUIDs are the same. tiny function, huge main character energy. let's get into it π
β¨ NAME β¨
uuid_compare β compare whether two UUIDs are the same π¦
πΈ SYNOPSIS πΈ
#include <uuid.h>
int uuid_compare(const uuid_t uu1, const uuid_t uu2)
like, that's it. that's the whole vibe. two UUIDs go in, a number comes out. no cap π
π DESCRIPTION π
The uuid_compare() function compares the two supplied uuid variables uu1 and uu2 to each other. literally just the two of them, side by side, having a little moment. that's the entire job and it does it slayfully β¨
π₯ RETURN VALUE π₯
It returns an integer that's less than, equal to, or greater than zero β and here's the chart bestie, memorize it iykyk:
- less than zero β
uu1is lexicographically less thanuu2 - equal to zero β
uu1is equal touu2 - greater than zero β
uu1is lexicographically greater thanuu2
so like, it's giving comparison-function, not just a yes/no. mind the lexicographically tho, it's doing real work there π
π AUTHORS π
Theodore Y. Ts'o π«Ά (icon behavior, honestly)
π SEE ALSO π
the whole friend group, fr fr:
β AVAILABILITY β
The libuuid library is part of the util-linux package since version 2.15.1. It can be downloaded from the Linux Kernel Archive <https://www.kernel.org/pub/linux/utils/util-linux/> β go get your girl, she's right there π§
β οΈ real talk though: this one's just a comparison. noNULLwarnings, no undefined behavior drama on this page β but always read the return value properly, because0means equal, not error, and that trips people up constantly π
and that's the whole page, bestie!! π this lil handbook moment was brought to you by util-linux 2.41.6, dated 2026-08-31 β mwah, go compare some UUIDs ππ
π¦ where this page comes from
- alpine 3.22: util-linux-doc 2.41.6-r1 Β· GPL-3.0-or-later AND GPL-2.0-or-later AND GPL-2.0-only AND GPL-1.0-only AND LGPL-2.1-or-later AND BSD-1-Clause AND BSD-3-Clause AND BSD-4-Clause-UC AND MIT AND Public-Domain
- alpine 3.23: util-linux-doc 2.41.6-r1 Β· GPL-3.0-or-later AND GPL-2.0-or-later AND GPL-2.0-only AND GPL-1.0-only AND LGPL-2.1-or-later AND BSD-1-Clause AND BSD-3-Clause AND BSD-4-Clause-UC AND MIT AND Public-Domain
- fedora 43: libuuid-devel 2.41.6-1.fc43 Β· BSD-3-Clause AND LGPL-2.1-or-later
- fedora 43: libuuid-devel 2.41.6-1.fc43 Β· BSD-3-Clause AND LGPL-2.1-or-later
- fedora 44: libuuid-devel 2.41.6-1.fc44 Β· BSD-3-Clause AND LGPL-2.1-or-later
- fedora 44: libuuid-devel 2.41.6-1.fc44 Β· BSD-3-Clause AND LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms