123383Smckusick /* 247543Skarels * Copyright (c) 1982, 1986, 1991 Regents of the University of California. 347543Skarels * All rights reserved. 423383Smckusick * 547543Skarels * %sccs.include.redist.c% 647543Skarels * 7*56517Sbostic * @(#)subr_xxx.c 7.14 (Berkeley) 10/11/92 823383Smckusick */ 934Sbill 1047543Skarels /* 1147543Skarels * Miscellaneous trivial functions, including many 1247543Skarels * that are often inline-expanded or done in assembler. 1347543Skarels */ 14*56517Sbostic #include <sys/param.h> 15*56517Sbostic #include <sys/systm.h> 169758Ssam 17*56517Sbostic #include <machine/cpu.h> 18*56517Sbostic 1934Sbill /* 2047543Skarels * Unsupported device function (e.g. writing to read-only device). 2134Sbill */ 2247543Skarels enodev() 2334Sbill { 2434Sbill 258555Sroot return (ENODEV); 2634Sbill } 2734Sbill 2834Sbill /* 2947543Skarels * Unconfigured device function; driver not configured. 3034Sbill */ 3147543Skarels enxio() 3234Sbill { 3334Sbill 3447543Skarels return (ENXIO); 3547543Skarels } 3647543Skarels 3747543Skarels /* 3848434Skarels * Unsupported ioctl function. 3947543Skarels */ 4048434Skarels enoioctl() 4148434Skarels { 4248434Skarels 4348434Skarels return (ENOTTY); 4448434Skarels } 4548434Skarels 4648434Skarels /* 4748434Skarels * Unsupported system function. 4848434Skarels * This is used for an otherwise-reasonable operation 4948434Skarels * that is not supported by the current system binary. 5048434Skarels */ 5148434Skarels enosys() 5248434Skarels { 5348434Skarels 5448434Skarels return (ENOSYS); 5548434Skarels } 5648434Skarels 5748434Skarels /* 5848434Skarels * Return error for operation not supported 5948434Skarels * on a specific object or file type. 6048434Skarels */ 6147543Skarels eopnotsupp() 6247543Skarels { 6347543Skarels 6447543Skarels return (EOPNOTSUPP); 6547543Skarels } 6647543Skarels 6747543Skarels /* 6847543Skarels * Generic null operation, always returns success. 6947543Skarels */ 7047543Skarels nullop() 7147543Skarels { 7247543Skarels 738555Sroot return (0); 7434Sbill } 75