MCPcopy Create free account
hub / github.com/F-Stack/f-stack / device_set_devclass_fixed

Function device_set_devclass_fixed

freebsd/kern/subr_bus.c:2759–2772  ·  view source on GitHub ↗

* @brief Set the devclass of a device and mark the devclass fixed. * @see device_set_devclass() */

Source from the content-addressed store, hash-verified

2757 * @see device_set_devclass()
2758 */
2759int
2760device_set_devclass_fixed(device_t dev, const char *classname)
2761{
2762 int error;
2763
2764 if (classname == NULL)
2765 return (EINVAL);
2766
2767 error = device_set_devclass(dev, classname);
2768 if (error)
2769 return (error);
2770 dev->flags |= DF_FIXEDCLASS;
2771 return (0);
2772}
2773
2774/**
2775 * @brief Query the device to determine if it's of a fixed devclass

Callers

nothing calls this directly

Calls 1

device_set_devclassFunction · 0.85

Tested by

no test coverage detected