KDK_BIOS_GET_VERSION(3)

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

💖 KDK_BIOS_GET_VERSION 💖

okay so bestie, welcome to the kdk_bios_get_version(3) page — it lives in the Library Functions Manual and it's literally the moment your code gets to peek at what BIOS version the machine is running. no cap, it's a whole vibe. 🦋


✨ NAME ✨

kdk_bios_get_version — 获取bios版本 (get the BIOS version, periodt 💅)


🌸 SYNOPSIS 🌸

#include <libkybios.h>

extern const char* kdk_bios_get_version();

and listen, when you compile you gotta link it with -lkyhw or nothing's gonna happen, iykyk 🎀


🧚 Detailed Description 🧚

so the main function of this interface is to obtain the BIOS version. that's it, that's the job, and it does it beautifully. main character energy fr fr. ⭐


💜 RETURN VALUE 💜

  • on success? it hands you the BIOS version as a char*. but heads up bestie, that returned string needs to be released by free — you own it now, it's your child, take care of it. 🫶
  • on error? it just returns NULL. no drama, just nothing.
not me reminding you again: free that string. leaking it is NOT the vibe. 😭

🍓 EXAMPLES 🍓

here's the whole thing in action, copy it, run it, 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;
}

🌈 CONFORMING TO 🌈

these functions are as per the withdrawn POSIX.1e draft specification. and the following functions are Linux extensions: kdk_bios_get_vendor(). and kdk_bios_free(). yes bestie, extensions, we love to see it. 👑


🎀 SEE ALSO 🎀

go read those too, they're iconic, they're family. 💖


and that's the whole page! it came from the Linux Programmer's Manual, dated Thu Aug 14 2023 — mwah, no notes, go get that BIOS version bestie 💅✨🦋

📦 where this page comes from