tail head cat sleep
QR code linking to this page

Manual Pages  — DEVICE_DELETE_CHILD

NAME

device_delete_child – delete a child from a device

CONTENTS

SYNOPSIS

#include <sys/param.h>
#include <sys/bus.h>

int
device_delete_child(device_t dev, device_t child);

DESCRIPTION

The specified device is removed from dev and deleted. If the device is currently attached, it is first detached via device_detach(9). If device_detach() fails, its error value is returned. Otherwise, all descendant devices of child are deleted and zero is returned.

The BUS_CHILD_DELETED(9) method is invoked for each device that is deleted. This permits the parent device's driver to tear down any state associated with child devices such as ivars.

RETURN VALUES

Zero is returned on success, otherwise an error is returned.

SEE ALSO

BUS_CHILD_DELETED(9), device_add_child(9)

AUTHORS

This manual page was written by Doug Rabson.

DEVICE_DELETE_CHILD (9) February 5, 2025

tail head cat sleep
QR code linking to this page


Please direct any comments about this manual page service to Ben Bullock. Privacy policy.