add badop for reallocblks
[unix-history] / usr / src / sys / miscfs / specfs / specdev.h
CommitLineData
88859601 1/*
1446b03c
KB
2 * Copyright (c) 1990, 1993
3 * The Regents of the University of California. All rights reserved.
88859601 4 *
6dc0e27a 5 * %sccs.include.redist.c%
88859601 6 *
47e82354 7 * @(#)specdev.h 8.2 (Berkeley) %G%
88859601
KM
8 */
9
10/*
11 * This structure defines the information maintained about
12 * special devices. It is allocated in checkalias and freed
13 * in vgone.
14 */
15struct specinfo {
16 struct vnode **si_hashchain;
17 struct vnode *si_specnext;
18 long si_flags;
19 dev_t si_rdev;
20};
21/*
22 * Exported shorthand
23 */
24#define v_rdev v_specinfo->si_rdev
25#define v_hashchain v_specinfo->si_hashchain
26#define v_specnext v_specinfo->si_specnext
27#define v_specflags v_specinfo->si_flags
28
29/*
30 * Flags for specinfo
31 */
32#define SI_MOUNTEDON 0x0001 /* block special device is mounted on */
33
34/*
35 * Special device management
36 */
37#define SPECHSZ 64
38#if ((SPECHSZ&(SPECHSZ-1)) == 0)
39#define SPECHASH(rdev) (((rdev>>5)+(rdev))&(SPECHSZ-1))
40#else
41#define SPECHASH(rdev) (((unsigned)((rdev>>5)+(rdev)))%SPECHSZ)
42#endif
43
44struct vnode *speclisth[SPECHSZ];
184ba363
KM
45
46/*
47 * Prototypes for special file operations on vnodes.
48 */
ec532f0d 49extern int (**spec_vnodeop_p)();
6d18c7be 50struct nameidata;
cb5e2fbb 51struct componentname;
6d18c7be
KM
52struct ucred;
53struct flock;
54struct buf;
55struct uio;
56
184ba363
KM
57int spec_badop(),
58 spec_ebadf();
59
9342689a
JH
60int spec_lookup __P((struct vop_lookup_args *));
61#define spec_create ((int (*) __P((struct vop_create_args *)))spec_badop)
62#define spec_mknod ((int (*) __P((struct vop_mknod_args *)))spec_badop)
63int spec_open __P((struct vop_open_args *));
64int spec_close __P((struct vop_close_args *));
65#define spec_access ((int (*) __P((struct vop_access_args *)))spec_ebadf)
66#define spec_getattr ((int (*) __P((struct vop_getattr_args *)))spec_ebadf)
67#define spec_setattr ((int (*) __P((struct vop_setattr_args *)))spec_ebadf)
68int spec_read __P((struct vop_read_args *));
69int spec_write __P((struct vop_write_args *));
70int spec_ioctl __P((struct vop_ioctl_args *));
71int spec_select __P((struct vop_select_args *));
72#define spec_mmap ((int (*) __P((struct vop_mmap_args *)))spec_badop)
37843f55 73int spec_fsync __P((struct vop_fsync_args *));
9342689a
JH
74#define spec_seek ((int (*) __P((struct vop_seek_args *)))spec_badop)
75#define spec_remove ((int (*) __P((struct vop_remove_args *)))spec_badop)
76#define spec_link ((int (*) __P((struct vop_link_args *)))spec_badop)
77#define spec_rename ((int (*) __P((struct vop_rename_args *)))spec_badop)
78#define spec_mkdir ((int (*) __P((struct vop_mkdir_args *)))spec_badop)
79#define spec_rmdir ((int (*) __P((struct vop_rmdir_args *)))spec_badop)
80#define spec_symlink ((int (*) __P((struct vop_symlink_args *)))spec_badop)
81#define spec_readdir ((int (*) __P((struct vop_readdir_args *)))spec_badop)
82#define spec_readlink ((int (*) __P((struct vop_readlink_args *)))spec_badop)
83#define spec_abortop ((int (*) __P((struct vop_abortop_args *)))spec_badop)
84#define spec_inactive ((int (*) __P((struct vop_inactive_args *)))nullop)
85#define spec_reclaim ((int (*) __P((struct vop_reclaim_args *)))nullop)
86int spec_lock __P((struct vop_lock_args *));
87int spec_unlock __P((struct vop_unlock_args *));
88int spec_bmap __P((struct vop_bmap_args *));
89int spec_strategy __P((struct vop_strategy_args *));
90int spec_print __P((struct vop_print_args *));
91#define spec_islocked ((int (*) __P((struct vop_islocked_args *)))nullop)
b7c4b3cc 92int spec_pathconf __P((struct vop_pathconf_args *));
9342689a
JH
93int spec_advlock __P((struct vop_advlock_args *));
94#define spec_blkatoff ((int (*) __P((struct vop_blkatoff_args *)))spec_badop)
9342689a 95#define spec_valloc ((int (*) __P((struct vop_valloc_args *)))spec_badop)
47e82354
KM
96#define spec_reallocblks \
97 ((int (*) __P((struct vop_reallocblks_args *)))spec_badop)
9342689a
JH
98#define spec_vfree ((int (*) __P((struct vop_vfree_args *)))spec_badop)
99#define spec_truncate ((int (*) __P((struct vop_truncate_args *)))nullop)
100#define spec_update ((int (*) __P((struct vop_update_args *)))nullop)
101#define spec_bwrite ((int (*) __P((struct vop_bwrite_args *)))nullop)