BUS_GET_PROPERTY(9)

BUS_GET_PROPERTY9

Get child's specific property

Usage

#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);

Overview

The BUS_GET_PROPERTY() method is called from driver code which wants to access a child's specific data stored on the bus. A property has a name and an associated value. 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.

Return values

The property size if successful, otherwise -1.

Releases

13 releases since FreeBSD 13.2-RELEASE; the text changed 1 time.

  1. 13.2
  2. 13.3–16.0

Authors

This manual page was written by Bartlomiej Grzesik.

From base 16.0-CURRENT-20261027-61c70dc16a79 in FreeBSD 16.0-CURRENT (2026-10-27). Parsed by carta from the page's mdoc source.