RESOURCE_INT_VALUE(9)
π RESOURCE_INT_VALUE(9) π
okay so bestie, this page comes from the Kernel Developer's Manual, and it's literally the group-chat guide to pulling values out of the hints mechanism. no cap, kernel-dev energy only. π
β¨ NAME β¨
resource_int_value, resource_long_value, resource_string_value β get a value from the hints mechanism. periodt. π«Ά
πΈ SYNOPSIS πΈ
copy these includes and signatures exactly, bestie β character for character, no autocorrect nonsense:
#include <sys/param.h>
#include <sys/bus.h>
int
resource_int_value(const char *name, int unit, const char *resname,
int *result);
int
resource_long_value(const char *name, int unit, const char *resname,
long *result);
int
resource_string_value(const char *name, int unit, const char *resname,
const char **result);
π¦ DESCRIPTION π¦
These functions fetch a value from the hints mechanism. that's the whole assignment, and these three are the ones who pull it off. π
The functions take the following arguments:
nameβ the name of the device to get the resource value from.unitβ the unit number of the device.-1is special and is used for wildcard entries.resnameβ the resource name.resultβ a pointer to memory in which to store the resource value.
π RETURN VALUES π
If successful, the functions return 0. Otherwise, a non-zero error code is returned. so 0 is the slay result, and non-zero means something didn't pass the vibe check. π
π ERRORS π
The functions will fail if:
[ENOENT]β the resource could not be found. literally not in the chat. π[EFTYPE]β Inappropriate resource type. wrong-vibe resource, bestie. π
π SEE ALSO π
go read these too, bestie. π
π AUTHORS π
This manual page was written by Warner Losh <imp@FreeBSD.org>. shoutout to the icon who wrote it. π
mwah π xoxo, this page is from the Debian edition, dated March 1, 2001, and it's filed under RESOURCE_INT_VALUE(9). byeee π¦
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- Copyright (c) 2001 M. Warner Losh <imp@FreeBSD.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms