KDK_GET_DISKLISK(3)
✨ KDK_GET_DISKLISK ✨
okay bestie, so this is a page from the Library Functions Manual, it's kdk_get_disklist(3), and it's literally the girliest way to go find out what disks you have 💅 no cap.
🎀 NAME 🎀
kdk_get_disklist — 获取磁盘列表信息 (aka: get that disk list info, periodt)
🌸 SYNOPSIS 🌸
#include <libkydiskinfo.h>
extern char** kdk_get_disklist();
Link with -lkydiskinfo.
🦋 Detailed Description 🦋
So the kdk_get_disklist() function obtains disk list information during the call process. That's the whole vibe — you call it, it goes and gets you the disk list. main character energy fr fr 💖
💜 RETURN VALUE 💜
The return value is a char** type, and bestie, each string in there is the absolute path of a disk, and the whole thing ends with a NULL character. Like, that NULL is the little "we're done here" signal, iykyk.
After you're done with it, the kdk_free_disklist() function releases that list of disk information. Do NOT skip this, okay? Free your memory, queen 👑
⭐ EXAMPLES ⭐
#include "libkydiskinfo.h"
#include <stdio.h>
int main()
{
char **disklist = kdk_get_disklist();
for (int i = 0; disklist[i]; i ++)
{
printf("%s0, disklist[i]);
}
kdk_free_disklist(disklist);
return 0;
}
🌈 CONFORMING TO 🌈
These functions are as per the withdrawn POSIX.1e draft specification. The following functions are Linux extensions: kdk_get_diskinfo(), kdk_get_hard_disk(), and kdk_get_hard_disk_size().
👑 SEE ALSO 👑
kdk_free_disklist(3)kdk_get_diskinfo(3)kdk_free_diskinfo(3)
aaaand that's the page 🫶 this lil beauty lives in the Linux Programmer's Manual, dated Thu Aug 10 2023, and yes the header at the top said KDK_GET_DISKLISK(3) because we stay consistent. byeeee, go free your disklist 💖✨
📦 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