mountroothook_establish man page on OpenBSD

Man page or keyword search:  
man Server   11362 pages
apropos Keyword Search (all sections)
Output format
OpenBSD logo
[printable version]

MOUNTROOTHOOK_ESTABLISH(9)   OpenBSD Kernel Manual  MOUNTROOTHOOK_ESTABLISH(9)

NAME
     mountroothook_establish, mountroothook_disestablish - add or remove a
     mountroot hook

SYNOPSIS
     #include <sys/types.h>
     #include <sys/systm.h>

     void *
     mountroothook_establish(void (*fn)(void *), void *arg);

     void
     mountroothook_disestablish(void *cookie);

DESCRIPTION
     The mountroothook_establish() function adds fn to the list of hooks
     invoked by domountroothooks(9) at mountroot.  When invoked, the hook
     function fn will be passed arg as its only argument.

     The mountroothook_disestablish() function removes the hook described by
     the opaque pointer cookie from the list of hooks to be invoked at
     mountroot.	 If cookie is invalid, the result of
     mountroothook_disestablish() is undefined.

     Mountroot hooks should be used to perform one-time activities that must
     happen immediately after the root filesystem has been mounted by the
     kernel, but before init(8) has been started.

     Mountroot hooks are, like startup hooks, implemented via the more general
     dohooks(9) API.

RETURN VALUES
     If successful, mountroothook_establish() returns an opaque pointer
     describing the newly established mountroot hook.  Otherwise, it returns
     NULL.

EXAMPLES
     It may be appropriate to use a mountroot hook to split the attach
     function of a device driver.  Once the root filesystem is mounted, the
     hook will be called and it is safe to use loadfirmware(9) to get the
     firmware out of the filesystem.

SEE ALSO
     dohooks(9), domountroothooks(9), dostartuphooks(9)

BUGS
     The names are clumsy, at best.

OpenBSD 4.9			 May 31, 2007			   OpenBSD 4.9
[top]

List of man pages available for OpenBSD

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net