devclass_get_devices(9)

devclass_get_devices9

Get a list of devices in a devclass

Usage

#include <sys/param.h>

#include <sys/bus.h>

int

devclass_get_devices(devclass_t dc, device_t **devlistp, int *devcountp);

Overview

Retrieve a list of all device instances currently in the devclass and return the list in *devlistp and the count in *devcountp. The memory allocated for the list should be freed using free(*devlistp, M_TEMP), even if *devcountp is 0.

Return values

Zero is returned on success, otherwise an appropriate error is returned.

Releases

77 releases since FreeBSD 3.0-RELEASE; the text changed 38 times.

  1. 3.0–3.2
  2. 3.3–3.5.1
  3. 4.0–4.3
  4. 4.4
  5. 4.5–4.11
  6. 5.0–5.5
  7. 6.0–6.3
  8. 6.4
  9. 7.0
  10. 7.1
  11. 7.2
  12. 7.3
  13. 7.4
  14. 8.0
  15. 8.1
  16. 8.2
  17. 8.3
  18. 8.4
  19. 9.0
  20. 9.1
  21. 9.2
  22. 9.3
  23. 10.0
  24. 10.1
  25. 10.2
  26. 10.3
  27. 10.4
  28. 11.0
  29. 11.1
  30. 11.2
  31. 11.3
  32. 11.4
  33. 12.0
  34. 12.1
  35. 12.2
  36. 12.3
  37. 12.4
  38. 13.0–13.2
  39. 13.3–16.0

Authors

This manual page was written by Doug Rabson.

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