feature_present(3)

feature_present3

Query presence of a kernel feature

Usage

#include <unistd.h>

int

feature_present(const char *feature);

Library

Standard C Library (libc, -lc)

Overview

The feature_present() function provides a method for an application to determine if a specific kernel feature is present in the currently running kernel. The feature argument specifies the name of the feature to check. The feature_present() function will return 1 if the specified feature is present, otherwise it will return 0. If the feature_present() function is not able to determine the presence of feature due to an internal error it will return 0.

Return values

If feature is present then 1 is returned; otherwise 0 is returned.

Releases

41 releases since FreeBSD 7.3-RELEASE; the text changed 27 times.

  1. 7.3
  2. 7.4
  3. 8.0
  4. 8.1
  5. 8.2
  6. 8.3
  7. 8.4
  8. 9.0
  9. 9.1
  10. 9.2
  11. 9.3
  12. 10.0
  13. 10.1
  14. 10.2
  15. 10.3
  16. 10.4
  17. 11.0
  18. 11.1
  19. 11.2
  20. 11.3
  21. 11.4
  22. 12.0
  23. 12.1
  24. 12.2
  25. 12.3
  26. 12.4
  27. 13.0–13.2
  28. 13.3–16.0

History

The feature_present() function first appeared in FreeBSD 8.0.

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