linux_olduname.h revision 1.3 1 /* $NetBSD: linux_olduname.h,v 1.3 1995/08/14 01:12:17 mycroft Exp $ */
2
3 /*
4 * Copyright (c) 1995 Frank van der Linden
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 * 3. All advertising materials mentioning features or use of this software
16 * must display the following acknowledgement:
17 * This product includes software developed for the NetBSD Project
18 * by Frank van der Linden
19 * 4. The name of the author may not be used to endorse or promote products
20 * derived from this software without specific prior written permission
21 *
22 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
23 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
24 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
25 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
26 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
27 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
31 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 */
33
34 #ifndef _LINUX_TYPES_H
35 #define _LINUX_TYPES_H
36
37 typedef struct {
38 long val[2];
39 } linux_fsid_t;
40
41 typedef unsigned short linux_uid_t;
42 typedef unsigned short linux_gid_t;
43 typedef unsigned short linux_dev_t;
44 typedef unsigned long linux_ino_t;
45 typedef unsigned short linux_mode_t;
46 typedef unsigned short linux_nlink_t;
47 typedef long linux_time_t;
48 typedef long linux_clock_t;
49 typedef long linux_off_t;
50 typedef int linux_pid_t;
51
52 struct linux_statfs {
53 long l_ftype;
54 long l_fbsize;
55 long l_fblocks;
56 long l_fbfree;
57 long l_fbavail;
58 long l_ffiles;
59 long l_fffree;
60 linux_fsid_t l_ffsid;
61 long l_fnamelen;
62 long l_fspare[6];
63 };
64
65 /*
66 * Structure for uname(2)
67 */
68 struct linux_utsname {
69 char l_sysname[65];
70 char l_nodename[65];
71 char l_release[65];
72 char l_version[65];
73 char l_machine[65];
74 char l_domainname[65];
75 };
76
77 /*
78 * Passed to the mmap() system call
79 */
80 struct linux_mmap {
81 caddr_t lm_addr;
82 int lm_len;
83 int lm_prot;
84 int lm_flags;
85 int lm_fd;
86 int lm_pos;
87 };
88
89 /*
90 * Passed to the select() system call
91 */
92 struct linux_select {
93 int nfds;
94 fd_set *readfds;
95 fd_set *writefds;
96 fd_set *exceptfds;
97 struct timeval *timeout;
98 };
99
100 struct linux_stat {
101 linux_dev_t lst_dev;
102 unsigned short pad1;
103 linux_ino_t lst_ino;
104 linux_mode_t lst_mode;
105 linux_nlink_t lst_nlink;
106 linux_uid_t lst_uid;
107 linux_gid_t lst_gid;
108 linux_dev_t lst_rdev;
109 unsigned short pad2;
110 linux_off_t lst_size;
111 unsigned long lst_blksize;
112 unsigned long lst_blocks;
113 linux_time_t lst_atime;
114 unsigned long unused1;
115 linux_time_t lst_mtime;
116 unsigned long unused2;
117 linux_time_t lst_ctime;
118 unsigned long unused3;
119 unsigned long unused4;
120 unsigned long unused5;
121 };
122
123 struct linux_tms {
124 linux_clock_t ltms_utime;
125 linux_clock_t ltms_stime;
126 linux_clock_t ltms_cutime;
127 linux_clock_t ltms_cstime;
128 };
129
130 struct linux_utimbuf {
131 linux_time_t l_actime;
132 linux_time_t l_modtime;
133 };
134
135 #endif /* !_LINUX_TYPES_H */
136