BUS_GET_PROPERTY(9)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1, nixpkgs unstable

πŸ’– NAME πŸ’–

okay bestie, meet BUS_GET_PROPERTY β€” it’s from the Kernel Developer's Manual, section 9, and its whole job is literally β€œget child's specific property.” That’s the vibe. 🫢


✨ SYNOPSIS ✨

#include <sys/param.h>
#include <sys/bus.h>

ssize_t
BUS_GET_PROPERTY(device_t dev, device_t child, const char *propname,
    void *propvalue, size_t size, device_property_type_t type);

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so BUS_GET_PROPERTY() is the method driver code calls when it wants to access a child’s specific data stored on the bus. A property has a name and an associated value β€” that’s the whole concept, no cap. The implementation shall copy to propvalue at most size bytes. πŸ’…

BUS_GET_PROPERTY() supports different property types specified via the type argument. The size is guaranteed to be a multiple of the underlying property type. If a type is not supported, BUS_GET_PROPERTY() shall return -1. 😭


πŸŽ€ NOTES πŸŽ€

If propvalue is NULL or size is zero, the implementation shall return only the size of the property. That’s it β€” just the size, bestie. ✨


πŸ‘‘ RETURN VALUES πŸ‘‘

The property size if successful, otherwise -1. Slay. πŸ’€


🌈 SEE ALSO 🌈


🌸 AUTHORS 🌸

This manual page was written by Bartlomiej Grzesik. iconic behavior, honestly. πŸ’–


xoxo, your kernel bestie 🧚 β€” this page’s footer energy is Debian, February 18, 2022, BUS_GET_PROPERTY(9), and that’s the whole sign-off. periodt πŸ’…

πŸ“¦ where this page comes from