KDK_BIOS_GET_VENDOR(3)

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

💖 kdk_bios_get_vendor(3) — the manual page, but make it cute 💖

okay bestie, so this is kdk_bios_get_vendor(3), from the Linux Programmer's Manual. it lives in the Library Functions section and it is so simple you're gonna scream. let's get into it 💅


✨ NAME ✨

kdk_bios_get_vendor — 获取bios厂商 (that's "get the BIOS vendor", for those of us not fluent in the source, and yes the manpage itself says it in Chinese, we're keeping it exactly as-is 🎀)


🌸 SYNOPSIS 🌸

#include <libkybios.h>

extern const char* kdk_bios_get_vendor();

and listen, you gotta Link with -lkyhw. don't forget it or the linker will be giving you the silent treatment 💀


🦋 DETAILED DESCRIPTION 🦋

The main function of the interface is to obtain bios manufacturer. that's it. that's the whole job. it walks in, it grabs the BIOS manufacturer, main character energy, no cap 👑


🎀 RETURN VALUE 🎀

  • On success — returns the bios manufacturer of type char*. important: the returned string needs to be released by free. she gives you a gift, you gotta hand it back, okay? 🫶
  • On error — return NULL.
fr fr do NOT forget the free. leaking memory is not the vibe.

💖 EXAMPLES 💖

here's the whole thing in action, verbatim, copy it and slay:

#include <stdio.h>
#include "libkybios.h"
#include <stdlib.h>

int main()
{
    char *vendor = kdk_bios_get_vendor();
    char *version = kdk_bios_get_version();
    printf("vendor: %s", vendor);
    printf("version: %s",version);
    free(vendor);
    free(version);
    return 0;
}

see how both of them get freed? that's the energy. that's the whole assignment 🌟


🌈 CONFORMING TO 🌈

These functions are as per the withdrawn POSIX.1e draft specification.

The following functions are Linux extensions: kdk_bios_get_version(). and kdk_bios_free().

note the word "withdrawn" bestie — that spec is not among us anymore, but these functions still are. iconic behavior honestly 😭

⭐ SEE ALSO ⭐

go read those next, they're the rest of the friend group 💜


aaaand that's the page!! this one came out of the Linux Programmer's Manual, dated Thu Aug 14 2023. stay hydrated, free your strings, and go read a manpage for fun sometime 💖✨🎀🦋🌸

📦 where this page comes from