dmi_get_bios_year(9)
π dmi_get_bios_year β the kernel API manual, bestie edition π
okay so real talk, this one is a little function from the Kernel API Manual and its whole personality is "grab a year out of the DMI_BIOS_DATE field." that's it. that's the gig. but she does it flawlessly, so we stan π«Ά
β¨ SYNOPSIS β¨
int dmi_get_bios_year (void );
like, no cap, that's the entire signature. she takes nothing, she returns an int. lowkey iconic of her π
π ARGUMENTS π
voidβ literally no arguments. zero. none. she doesn't need your input, bestie, she's got this on her own πΈ
π¦ DESCRIPTION π¦
so here's the vibe check: on success she returns the year. like an actual year, pls respect her π₯
but the plot thickens π β she can also come back with:
-ENXIOif DMI is not selected. that's the "sorry babe, wrong room" error π- a different negative error code if the DMI field is not present or not parseable. translation: the field is missing, or it's giving nonsense and she can't read it π
ngl, always error-check this one β if you just assume you got a year back you might be out here treating -ENXIO like it's 2024. it is not. it is a negative number. please check. π
π SEE ALSO π
the source lives in the kernel file ./drivers/firmware/dmi_scan.c, and honestly her whole friend group is here β go say hi π«Ά
dmi_setup(9)dmi_matches(9)dmi_is_end_of_table(9)dmi_check_system(9)dmi_first_match(9)dmi_get_system_info(9)dmi_name_in_serial(9)dmi_name_in_vendors(9)dmi_find_device(9)dmi_get_date(9)dmi_walk(9)dmi_match(9)dmi_memdev_type(9)dmi_memdev_handle(9)
and that's the whole page, bestie!! πβ¨ this little gem comes to you from ./drivers/firmware and it's dated October 2026 β so yes, she's from the future, and she still ate π
ππ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms