devclass_get_maxunit(9freebsd)

devclass_get_maxunit9freebsd

Find the maximum unit number in the class

Usage

#include <sys/param.h>

#include <sys/bus.h>

int

devclass_get_maxunit(devclass_t dc);

Overview

Returns the next unit number to be allocated to device instances in the devclass. This is one greater than the highest currently allocated unit.

Return values

The devclass_get_maxunit() function returns -1 if dc is NULL, otherwise it returns the next unit number in dc's devclass.

Errors

None.

Releases

9 releases since Debian 5.0 (Lenny); the text changed 6 times.

  1. 5.0
  2. 6.0
  3. 7
  4. 8
  5. 9
  6. 10
  7. 11–13

Authors

This manual page was written by Doug Rabson.

Bugs

The name is confusing since it is one greater than the maximum unit.

From freebsd-manpages 12.2-2 in Debian 13 (Trixie). Parsed by carta from the page's mdoc source.