unixdev.h revision 1.3 1 1.3 nonaka /* $NetBSD: unixdev.h,v 1.3 2012/01/18 23:12:21 nonaka Exp $ */
2 1.1 nonaka /* $OpenBSD: unixdev.h,v 1.1 2005/05/24 20:38:20 uwe Exp $ */
3 1.1 nonaka
4 1.1 nonaka /*
5 1.1 nonaka * Copyright (c) 1996 Michael Shalayeff
6 1.1 nonaka * All rights reserved.
7 1.1 nonaka *
8 1.1 nonaka * Redistribution and use in source and binary forms, with or without
9 1.1 nonaka * modification, are permitted provided that the following conditions
10 1.1 nonaka * are met:
11 1.1 nonaka * 1. Redistributions of source code must retain the above copyright
12 1.1 nonaka * notice, this list of conditions and the following disclaimer.
13 1.1 nonaka * 2. Redistributions in binary form must reproduce the above copyright
14 1.1 nonaka * notice, this list of conditions and the following disclaimer in the
15 1.1 nonaka * documentation and/or other materials provided with the distribution.
16 1.1 nonaka *
17 1.1 nonaka * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18 1.1 nonaka * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19 1.1 nonaka * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 1.1 nonaka * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
21 1.1 nonaka * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 1.1 nonaka * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 1.1 nonaka * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 1.1 nonaka * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 1.1 nonaka * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 1.1 nonaka * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 1.1 nonaka * SUCH DAMAGE.
28 1.1 nonaka *
29 1.1 nonaka */
30 1.1 nonaka
31 1.1 nonaka #ifndef _STAND_UNIXDEV_H_
32 1.1 nonaka #define _STAND_UNIXDEV_H_
33 1.1 nonaka
34 1.1 nonaka struct linux_timeval;
35 1.1 nonaka struct linux_stat;
36 1.1 nonaka
37 1.1 nonaka /* unixcons.c */
38 1.1 nonaka #define CONSDEV_GLASS 0
39 1.1 nonaka #define CONSDEV_COM0 1
40 1.1 nonaka
41 1.1 nonaka void consinit(int, int);
42 1.1 nonaka int awaitkey(int, int);
43 1.1 nonaka
44 1.1 nonaka /* unixdev.c */
45 1.1 nonaka int unixopen(struct open_file *, ...);
46 1.3 nonaka int unixpathopen(struct open_file *, ...);
47 1.1 nonaka int unixclose(struct open_file *);
48 1.1 nonaka int unixioctl(struct open_file *, u_long, void *);
49 1.1 nonaka int unixstrategy(void *, int, daddr_t, size_t, void *, size_t *);
50 1.1 nonaka int sleep(int seconds);
51 1.1 nonaka
52 1.1 nonaka /* unixsys.S */
53 1.1 nonaka extern int errno;
54 1.1 nonaka int uopen(const char *, int, ...);
55 1.1 nonaka int uread(int, void *, size_t);
56 1.1 nonaka int uwrite(int, void *, size_t);
57 1.1 nonaka int uioctl(int, u_long, void *);
58 1.1 nonaka int uclose(int);
59 1.1 nonaka off_t ulseek(int, off_t, int);
60 1.1 nonaka void uexit(int) __attribute__((noreturn));
61 1.1 nonaka int uselect(int, fd_set *, fd_set *, fd_set *, struct linux_timeval *);
62 1.1 nonaka int ustat(const char *, struct linux_stat *);
63 1.2 nonaka int ufstat(int, struct linux_stat *);
64 1.1 nonaka int syscall(int, ...);
65 1.1 nonaka int __syscall(quad_t, ...);
66 1.1 nonaka
67 1.1 nonaka #endif /* _STAND_UNIXDEV_H_ */
68