LIBKYHWINFO(3)

📦 version 3.0.1.4, in arch rolling, ubuntu resolute, ubuntu stonking

💖 LIBKYHWINFO — the libkyusb girlies' manual page 💖

okay so bestie, welcome to the Library Functions Manual for LIBKYHWINFO 💅 this is the page about poking at your USB stuff, and honestly? it's giving iconic. let's go ✨


🌸 NAME 🌸

kdk_usb_get_list, kdk_usb_free — 获取usb信息 🦋

(yeah she's bilingual, she contains multitudes, we stan)


✨ SYNOPSIS ✨

#include <libkyusb.h>

extern pDriverInfoList kdk_usb_get_list();

extern void kdk_usb_free(pDriverInfoList list);

Link with -lkyusb. 🔗 that's not optional bestie, that's the whole vibe.


🎀 Detailed Description 🎀

This library contains usb information. that's it, that's the whole personality. she knows about your USB devices and she's not shy about it 💜


👑 DATA STRUCTURES 👑

🧚 Structure pDriverInfoList

Structure pDriverInfoList contains information related to a usb information:

typedef struct driver_list {
     struct driver_info *data;
    struct driver_list *next;
}  DriverInfoList, *pDriverInfoList;
There are other members not documented here, which are only meant for libkyusb internal use. 🙈 do not perceive them, they're shy, mind your business bestie.

🍓 Structure driver_info

Structure driver_info contains information related to a usb information:

typedef struct driver_info {
     char name[32]; //名称
    char type[2 + 1]; //类型
    char pid[4 + 1];
    char vid[4 + 1];
    char serialNo[32]; //序列号
    char devNode[32]; //路径
} DriverInfo, *pDriverInfo;
There are other members not documented here, which are only meant for libkyusb internal use. same energy, same energy. 🙈✨

look at those fixed-size char arrays. 32 for the name, 2 + 1 for the type, 4 + 1 for the pid and vid (the + 1 is for the null terminator, the way she said "I need room to breathe" 😭). serialNo and devNode get their 32 too. no cap.


💀 RETURN VALUE 💀

The return value is generally specific to the individual function called. so like... check the function's own page, babe, this one's not gonna hold your hand on that 🫶


🌈 CONFORMING TO 🌈

These functions are as per the withdrawn POSIX.1e draft specification. yes, withdrawn. she's vintage, she's a discontinued draft specification girlie, and she ate regardless 💅

The following functions are Linux extensions: kdk_usb_get_list() and kdk_usb_free().


🔥 SEE ALSO 🔥

like, literally go read those two, iykyk ⭐


and that's the whole page, bestie!! written by the Linux Programmer's Manual and dated Fri Aug 25 2023 🎀 no notes, she was perfect, periodt. now go call kdk_usb_get_list() and remember to kdk_usb_free() your list, we are NOT leaking memory in this house 🫶💖✨

📦 where this page comes from