"Fixed" assorted bitrot. remove_dev() was renamed to destroy_dev().
VOP_ABORTOP() went away. at_shutdown() was replaced by undocumented event handling. Rename remove_dev() here too, and remove the dead and dead wrong man pages.
This commit is contained in:
parent
e7678c1e4c
commit
bd00dbfafc
@ -4,14 +4,14 @@ MAN9= MD5.9 \
|
||||
VFS.9 VFS_FHTOVP.9 VFS_INIT.9 VFS_MOUNT.9 VFS_QUOTACTL.9 \
|
||||
VFS_ROOT.9 VFS_START.9 VFS_STATFS.9 VFS_SYNC.9 VFS_UNMOUNT.9 \
|
||||
VFS_VGET.9 VFS_VPTOFH.9 VFS_CHECKEXP.9 \
|
||||
VOP_ABORTOP.9 VOP_ACCESS.9 VOP_ADVLOCK.9 VOP_ATTRIB.9 \
|
||||
VOP_ACCESS.9 VOP_ADVLOCK.9 VOP_ATTRIB.9 \
|
||||
VOP_BWRITE.9 VOP_CREATE.9 VOP_FSYNC.9 VOP_LEASE.9 \
|
||||
VOP_GETPAGES.9 VOP_INACTIVE.9 VOP_IOCTL.9 VOP_LINK.9 \
|
||||
VOP_LOCK.9 VOP_LOOKUP.9 VOP_MMAP.9 VOP_OPENCLOSE.9 \
|
||||
VOP_PATHCONF.9 VOP_PRINT.9 VOP_RDWR.9 VOP_READDIR.9 \
|
||||
VOP_READLINK.9 VOP_REALLOCBLKS.9 VOP_REMOVE.9 VOP_RENAME.9 \
|
||||
VOP_STRATEGY.9 \
|
||||
at_exit.9 at_fork.9 at_shutdown.9 bios.9 boot.9 buf.9 cd.9 copy.9 \
|
||||
at_exit.9 at_fork.9 bios.9 boot.9 buf.9 cd.9 copy.9 \
|
||||
devfs_add_devswf.9 devfs_link.9 devfs_remove_dev.9 devstat.9 \
|
||||
devtoname.9 fetch.9 ifnet.9 inittodr.9 intro.9 kernacc.9 malloc.9 \
|
||||
make_dev.9 microseq.9 mi_switch.9 namei.9 panic.9 physio.9 posix4.9 \
|
||||
@ -53,7 +53,6 @@ MLINKS+=VOP_RDWR.9 VOP_WRITE.9
|
||||
MLINKS+=VOP_REMOVE.9 VOP_RMDIR.9
|
||||
MLINKS+=at_exit.9 rm_at_exit.9
|
||||
MLINKS+=at_fork.9 rm_at_fork.9
|
||||
MLINKS+=at_shutdown.9 rm_at_shutdown.9
|
||||
MLINKS+=copy.9 copyin.9 copy.9 copyinstr.9 copy.9 copyout.9 copy.9 copystr.9
|
||||
MLINKS+=devfs_link.9 devfs_makelink.9
|
||||
MLINKS+=devstat.9 devicestat.9 devstat.9 devstat_add_entry.9
|
||||
@ -62,7 +61,7 @@ MLINKS+=devstat.9 devstat_end_transaction.9
|
||||
MLINKS+=fetch.9 fubyte.9 fetch.9 fuswintr.9 fetch.9 fusword.9 fetch.9 fuword.9
|
||||
MLINKS+=ifnet.9 if_data.9 ifnet.9 ifaddr.9 ifnet.9 ifqueue.9
|
||||
MLINKS+=kernacc.9 useracc.9
|
||||
MLINKS+=make_dev.9 remove_dev.9
|
||||
MLINKS+=make_dev.9 destroy_dev.9
|
||||
MLINKS+=malloc.9 FREE.9 malloc.9 MALLOC.9 malloc.9 free.9
|
||||
MLINKS+=mi_switch.9 cpu_switch.9
|
||||
MLINKS+=posix4.9 p1003_1b.9
|
||||
|
@ -1,76 +0,0 @@
|
||||
.\" -*- nroff -*-
|
||||
.\"
|
||||
.\" Copyright (c) 1996 Doug Rabson
|
||||
.\"
|
||||
.\" All rights reserved.
|
||||
.\"
|
||||
.\" This program is free software.
|
||||
.\"
|
||||
.\" Redistribution and use in source and binary forms, with or without
|
||||
.\" modification, are permitted provided that the following conditions
|
||||
.\" are met:
|
||||
.\" 1. Redistributions of source code must retain the above copyright
|
||||
.\" notice, this list of conditions and the following disclaimer.
|
||||
.\" 2. Redistributions in binary form must reproduce the above copyright
|
||||
.\" notice, this list of conditions and the following disclaimer in the
|
||||
.\" documentation and/or other materials provided with the distribution.
|
||||
.\"
|
||||
.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
|
||||
.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
.\"
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd July 24, 1996
|
||||
.Os
|
||||
.Dt VOP_ABORTOP 9
|
||||
.Sh NAME
|
||||
.Nm VOP_ABORTOP
|
||||
.Nd abort a directory operation
|
||||
.Sh SYNOPSIS
|
||||
.Fd #include <sys/param.h>
|
||||
.Fd #include <sys/vnode.h>
|
||||
.Ft int
|
||||
.Fn VOP_ABORTOP "struct vnode *dvp" "struct componentname *cnp"
|
||||
.Sh DESCRIPTION
|
||||
This is called after
|
||||
.Xr namei 9
|
||||
when a
|
||||
.Dv CREATE /
|
||||
.Dv DELETE
|
||||
isn't actually done.
|
||||
If a buffer has been saved in anticipation of a
|
||||
.Dv CREATE ,
|
||||
delete it.
|
||||
.Bl -tag -width dvp
|
||||
.It Ar dvp
|
||||
the vnode of the directory
|
||||
.It Ar cnp
|
||||
pathname information for the aborted operation
|
||||
.El
|
||||
.Sh PSEUDOCODE
|
||||
.Bd -literal
|
||||
int
|
||||
vop_abortop(struct vnode *dvp, struct componentname *cnp)
|
||||
{
|
||||
if ((cnp->cn_flags & (HASBUF | SAVESTART)) == HASBUF)
|
||||
free(cnp->cn_pnbuf, M_NAMEI);
|
||||
|
||||
return 0;
|
||||
}
|
||||
.Ed
|
||||
.Sh LOCKS
|
||||
.Fa dvp
|
||||
should be locked on entry and remain locked on return.
|
||||
.Sh SEE ALSO
|
||||
.Xr vnode 9
|
||||
.Sh AUTHORS
|
||||
This man page was written by
|
||||
.An Doug Rabson .
|
@ -1,103 +0,0 @@
|
||||
.\"
|
||||
.\" Copyright (c) 1996 Julian Elischer
|
||||
.\"
|
||||
.\" All rights reserved.
|
||||
.\"
|
||||
.\" Redistribution and use in source and binary forms, with or without
|
||||
.\" modification, are permitted provided that the following conditions
|
||||
.\" are met:
|
||||
.\" 1. Redistributions of source code must retain the above copyright
|
||||
.\" notice, this list of conditions and the following disclaimer.
|
||||
.\" 2. Redistributions in binary form must reproduce the above copyright
|
||||
.\" notice, this list of conditions and the following disclaimer in the
|
||||
.\" documentation and/or other materials provided with the distribution.
|
||||
.\"
|
||||
.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
|
||||
.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
.\"
|
||||
.\" $FreeBSD$
|
||||
.\" "
|
||||
.Dd August 15, 1996
|
||||
.Os
|
||||
.Dt AT_SHUTDOWN 9
|
||||
.Sh NAME
|
||||
.Nm at_shutdown ,
|
||||
.Nm rm_at_shutdown
|
||||
.Nd ask that a function be run at shutdown.
|
||||
.Sh SYNOPSIS
|
||||
.Fd #include <sys/types.h>
|
||||
.Fd #include <sys/systm.h>
|
||||
.Fd #include <sys/reboot.h>
|
||||
.Ft typedef void \*(lp*bootlist_fn\*(rp\*(lpint howto, void *arg\*(rp
|
||||
|
||||
.Ft int
|
||||
.Fn at_shutdown "bootlist_fn func" "void *arg" "int when"
|
||||
.Ft int
|
||||
.Fn rm_at_shutdown "bootlist_fn func" "void *arg"
|
||||
.Sh DESCRIPTION
|
||||
The
|
||||
.Nm at_shutdown
|
||||
facility allows a kernel module to ensure that it is notified
|
||||
at system shutdown.
|
||||
The function
|
||||
.Fa func
|
||||
is called with the flags indicating boot type, and the opaque argument
|
||||
.Fa arg
|
||||
when the system is shut down.
|
||||
.Pp
|
||||
If the requirement for notification is removed, then the function
|
||||
.Fn rm_at_shutdown
|
||||
must be called with the exact
|
||||
.Fa func
|
||||
and
|
||||
.Fa arg
|
||||
arguments as the corresponding call to
|
||||
.Fn at_shutdown .
|
||||
There are three shutdown queues, the first is run before the final filesystems
|
||||
sync, the second is run after the sync, before the system disables all
|
||||
interrupts, and the last queue is run with interrupts disabled just before
|
||||
the system is reset or halted
|
||||
.
|
||||
The last argument to
|
||||
.Fa at_shutdown
|
||||
should be one of
|
||||
.Dv SHUTDOWN_PRE_SYNC
|
||||
or
|
||||
.Dv SHUTDOWN_POST_SYNC
|
||||
or
|
||||
.Dv SHUTDOWN_FINAL
|
||||
to specify which queue should be used.
|
||||
.Fn rm_at_shutdown
|
||||
will remove entries from any queue.
|
||||
.Pp
|
||||
.Sh RETURN VALUES
|
||||
.Fn at_shutdown
|
||||
returns an error code, 0 meaning success.
|
||||
.Fn rm_at_shutdown
|
||||
returns the number of items removed (should be 0 or 1).
|
||||
.Sh SEE ALSO
|
||||
.Xr reboot 2 ,
|
||||
.Xr boot 9
|
||||
.Sh HISTORY
|
||||
The
|
||||
.Fn at_shutdown
|
||||
and
|
||||
.Fn rm_shutdown
|
||||
functions
|
||||
appeared in
|
||||
.Fx 2.2 .
|
||||
.Sh BUGS
|
||||
Since the shutdown queue is not sorted
|
||||
and items are added to the head, order of execution
|
||||
is reversed to that of insertion.
|
||||
.Sh AUTHORS
|
||||
The function was written by
|
||||
.An Julian Elischer Aq julian@FreeBSD.org .
|
@ -29,15 +29,15 @@
|
||||
.Dt MAKE_DEV 9
|
||||
.Sh NAME
|
||||
.Nm make_dev ,
|
||||
.Nm remove_dev
|
||||
.Nd "Create or remove dev_t and devfs registration for a new device"
|
||||
.Nm destroy_dev
|
||||
.Nd "Create or destroy dev_t and devfs registration for a new device"
|
||||
.Sh SYNOPSIS
|
||||
.Fd #include <sys/types.h>
|
||||
.Fd #include <sys/conf.h>
|
||||
.Ft dev_t
|
||||
.Fn make_dev "struct cdevsw *devsw" "int minor" "uid_t uid" "gid_t gid" "int perms" "char *fmt" ...
|
||||
.Fn make_dev "struct cdevsw *cdevsw" "int minor" "uid_t uid" "gid_t gid" "int perms" "char *fmt" ...
|
||||
.Ft void
|
||||
.Fn remove_dev "dev_t dev"
|
||||
.Fn destroy_dev "dev_t dev"
|
||||
.Sh DESCRIPTION
|
||||
The
|
||||
.Fn make_dev
|
||||
@ -80,16 +80,16 @@ are defined in
|
||||
.Ed
|
||||
.Pp
|
||||
The
|
||||
.Fn remove_dev
|
||||
.Fn destroy_dev
|
||||
function takes the returned
|
||||
.Fa dev_t
|
||||
from
|
||||
.Fn make_dev
|
||||
and removes the registration for that device.
|
||||
and destroys the registration for that device.
|
||||
.Sh HISTORY
|
||||
The
|
||||
.Fn make_dev
|
||||
and
|
||||
.Fn remove_dev
|
||||
.Fn destroy_dev
|
||||
functions first appeared in
|
||||
.Fx 4.0 .
|
||||
|
Loading…
Reference in New Issue
Block a user