gone_in(9)

gone_in9

Deprecation notice functions

Usage

#include <sys/systm.h>

void

gone_in(int major, const char *msg, ...);

void

gone_in_dev(device_t dev, int major, const char *msg, ...);

Overview

The gone_in functions are used to provide a notice that the kernel is actively using a driver or some other functionality that is deprecated, and is planned for removal in a future FreeBSD release. The notice is sent to the kernel dmesg(8) log and will appear on the console. The major argument specifies the major version of the FreeBSD release that will remove the deprecated functionality. The notice shall be printed only once, thus gone_in functions are safe to use in often executed code paths.

gone_in_dev will prepend driver name before the notice.

In releases before major the provided notice will be appended with“ To be removed in FreeBSDmajor”.

Examples

void
example_api(foo_t *args)
{
	gone_in(16, "Warning! %s[%u] uses obsolete API. ",
	    curthread->td_proc->p_comm, curthread->td_proc->p_pid);
	/* API implementation omitted. */
}
int
example_driver_attach(struct example_driver_softc *sc)
{
	/* Attach code omitted. */
        gone_in_dev(sc->dev, 16, "driver is deprecated");
}

Releases

15 releases since FreeBSD 12.4-RELEASE; the text changed 5 times.

  1. 12.4–13.2
  2. 13.3–14.3
  3. 14.4–14.5
  4. 15.0
  5. 15.1
  6. 16.0

History

The gone_in functions first appeared in FreeBSD 11.

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