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