kvm_geterr(3)

kvm_geterr3

Get error message on kvm descriptor

Usage

#include <kvm.h>

char *

kvm_geterr(kvm_t *kd);

Library

Kernel Data Access Library (libkvm, -lkvm)

Overview

This function returns a string describing the most recent error condition on the descriptor kd. The results are undefined if the most recent kvm(3) library call did not produce an error. The string returned is stored in memory owned by kvm(3) so the message should be copied out and saved elsewhere if necessary.

Return values

The function kvm_geterr() will return "" if kd is NULL or an error has not been captured for kd.

Releases

87 releases since FreeBSD 2.0.5-RELEASE; the text changed 41 times.

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

Bugs

This routine cannot be used to access error conditions due to a failed kvm_openfiles() call, since failure is indicated by returning a NULL descriptor. Therefore, errors on open are output to the special error buffer passed to kvm_openfiles(). This option is not available to kvm_open().

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