xref: /original-bsd/sys/kern/subr_xxx.c (revision 58b1b499)
1 /*
2  * Copyright (c) 1982, 1986, 1991, 1993
3  *	The Regents of the University of California.  All rights reserved.
4  *
5  * %sccs.include.redist.c%
6  *
7  *	@(#)subr_xxx.c	8.3 (Berkeley) 03/29/95
8  */
9 
10 /*
11  * Miscellaneous trivial functions, including many
12  * that are often inline-expanded or done in assembler.
13  */
14 #include <sys/param.h>
15 #include <sys/systm.h>
16 
17 #include <machine/cpu.h>
18 
19 /*
20  * Unsupported device function (e.g. writing to read-only device).
21  */
22 int
23 enodev()
24 {
25 
26 	return (ENODEV);
27 }
28 
29 /*
30  * Unconfigured device function; driver not configured.
31  */
32 int
33 enxio()
34 {
35 
36 	return (ENXIO);
37 }
38 
39 /*
40  * Unsupported ioctl function.
41  */
42 int
43 enoioctl()
44 {
45 
46 	return (ENOTTY);
47 }
48 
49 /*
50  * Unsupported system function.
51  * This is used for an otherwise-reasonable operation
52  * that is not supported by the current system binary.
53  */
54 int
55 enosys()
56 {
57 
58 	return (ENOSYS);
59 }
60 
61 /*
62  * Return error for operation not supported
63  * on a specific object or file type.
64  */
65 int
66 eopnotsupp()
67 {
68 
69 	return (EOPNOTSUPP);
70 }
71 
72 /*
73  * Return error for an inval operation
74  * on a specific object or file type.
75  */
76 int
77 einval()
78 {
79 
80 	return (EINVAL);
81 }
82 
83 /*
84  * Generic null operation, always returns success.
85  */
86 int
87 nullop()
88 {
89 
90 	return (0);
91 }
92