1 /* $NetBSD: linux_olduname.h,v 1.5 1996/05/20 01:59:28 fvdl 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 struct linux_oldutsname { 78 char l_sysname[65]; 79 char l_nodename[65]; 80 char l_release[65]; 81 char l_version[65]; 82 char l_machine[65]; 83 }; 84 85 struct linux_oldoldutsname { 86 char l_sysname[9]; 87 char l_nodename[9]; 88 char l_release[9]; 89 char l_version[9]; 90 char l_machine[9]; 91 }; 92 93 /* 94 * Passed to the mmap() system call 95 */ 96 struct linux_mmap { 97 caddr_t lm_addr; 98 int lm_len; 99 int lm_prot; 100 int lm_flags; 101 int lm_fd; 102 int lm_pos; 103 }; 104 105 /* 106 * Passed to the select() system call 107 */ 108 struct linux_select { 109 int nfds; 110 fd_set *readfds; 111 fd_set *writefds; 112 fd_set *exceptfds; 113 struct timeval *timeout; 114 }; 115 116 struct linux_stat { 117 linux_dev_t lst_dev; 118 unsigned short pad1; 119 linux_ino_t lst_ino; 120 linux_mode_t lst_mode; 121 linux_nlink_t lst_nlink; 122 linux_uid_t lst_uid; 123 linux_gid_t lst_gid; 124 linux_dev_t lst_rdev; 125 unsigned short pad2; 126 linux_off_t lst_size; 127 unsigned long lst_blksize; 128 unsigned long lst_blocks; 129 linux_time_t lst_atime; 130 unsigned long unused1; 131 linux_time_t lst_mtime; 132 unsigned long unused2; 133 linux_time_t lst_ctime; 134 unsigned long unused3; 135 unsigned long unused4; 136 unsigned long unused5; 137 }; 138 139 struct linux_tms { 140 linux_clock_t ltms_utime; 141 linux_clock_t ltms_stime; 142 linux_clock_t ltms_cutime; 143 linux_clock_t ltms_cstime; 144 }; 145 146 struct linux_utimbuf { 147 linux_time_t l_actime; 148 linux_time_t l_modtime; 149 }; 150 151 struct linux___sysctl { 152 int *name; 153 int namelen; 154 void *old; 155 size_t *oldlenp; 156 void *new; 157 size_t newlen; 158 unsigned long __unused[4]; 159 }; 160 161 #endif /* !_LINUX_TYPES_H */ 162