KDK_FAN_GET_INFORMATION(3)
💖 KDK_FAN_GET_INFORMATION 💖
okay so bestie, we're in the Library Functions Manual, section 3 — it's the KDK_FAN_GET_INFORMATION page and it's all about asking your fans how they're doing 🌀✨
✨ NAME ✨
kdk_fan_get_information — 获取风扇的信息 (aka get the fan information, that's literally it, no notes)
🌸 SYNOPSIS 🌸
#include <libkyfan.h>
extern char** kdk_fan_get_information();
Link with -lkyfan. 🫶
🦋 DESCRIPTION 🦋
The main function of the interface is to obtain the fan information. That's the whole vibe — it's the main character of this interface and its one job is grabbing the fan info. No side quests, no drama, just fan facts. 💅
🎀 RETURN VALUE 🎀
- On success, returns a list of fan information of type
char*, including name and speed, ending with aNULLstring; Generated byallocand needs to be recycled bykdk_fan_freeall♻️ - On error, return
NULL. 💀
not thealloc'd memory being your responsibility now — bestie, if you don't hand it tokdk_fan_freeallyou're lowkey leaking. recycle ur list, queen 👑
🔥 EXAMPLES 🔥
here's the moment you've all been waiting for, the example, copied with love and character for character 🍓
#include "libkyfan.h"
#include <stdio.h>
#include <stdlib.h>
int main()
{
char **fan = kdk_fan_get_information();
int index = 0;
while (fan[index])
{
printf("%s0, fan[index]);
index++;
}
kdk_fan_freeall(fan);
return 0;
}
walk the list til you hit that NULL, print each entry, then free the whole thing. iconic behavior fr fr 🌈
💜 CONFORMING TO 💜
These functions are as per the withdrawn POSIX.1e draft specification. The following functions are Linux extensions: kdk_fan_freeall(). 🐧
"withdrawn" bestie… the POSIX.1e draft is a ghost, it's giving vintage, we still respect it tho 🕯️
👑 SEE ALSO 👑
and that's the whole page, bestie — no cap, you now know everything this manual knows 💖
🌸 this one came straight out of the Linux Programmer's Manual, dated Fri Aug 25 2023, and yes the title is still KDK_FAN_GET_INFORMATION(3) in case you forgot, which you didn't, because you're a genius 🎀✨
📦 where this page comes from
- arch rolling: libkysdk-system 3.0.1.4-1 · LGPL-3.0-or-later AND LGPL-2.1-only OR LGPL-3.0-only AND LGPL-2.1-only WITH Qt-LGPL-exception-1.1 OR LGPL-3.0-only WITH Qt-LGPL-exception-1.1 AND MIT
- ubuntu resolute: libkysdk-system-dev 3.0.1.2-0ubuntu1 · LGPL-3.0-only
- ubuntu stonking: libkysdk-system-dev 3.0.1.3-0ubuntu1 · LGPL-3.0-or-later
- 💖 girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms