tail head cat sleep
QR code linking to this page

Manual Pages  — DEVICE_ATTACH

NAME

DEVICE_ATTACH – attach a device

CONTENTS

SYNOPSIS

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

int
DEVICE_ATTACH(device_t dev);

DESCRIPTION

Attach a device to the system after the DEVICE_PROBE() method has been called and has indicated that the device exists. The DEVICE_ATTACH() method should initialize the hardware and allocate other system resources (such as devfs(5) entries).

Devices which implement buses should use this method to probe for the existence of devices attached to the bus and add them as children. If this is combined with the use of bus_generic_attach(9) the child devices will be automatically probed and attached.

RETURN VALUES

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

SEE ALSO

devfs(5), device(9), DEVICE_DETACH(9), DEVICE_IDENTIFY(9), DEVICE_PROBE(9), DEVICE_SHUTDOWN(9)

AUTHORS

This manual page was written by Doug Rabson <Mt dfr@FreeBSD.org>.

DEVICE_ATTACH (9) January 15, 2017

tail head cat sleep
QR code linking to this page


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

This philosophy, in the hands of amateurs, leads to inexplicably mind-numbing botches like the existence of two programs, “head” and “tail,” which print the first part or the last part of a file, depending. Even though their operations are duals of one another, “head” and “tail” are different programs, written by different authors, and take different options!
— The Unix Haters' handbook