1 /* $NetBSD: linux_olduname.h,v 1.2 1995/03/05 23:23:48 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 typedef unsigned long linux_sigset_t; 52 typedef void (*linux_handler_t)(int); 53 54 struct linux_statfs { 55 long l_ftype; 56 long l_fbsize; 57 long l_fblocks; 58 long l_fbfree; 59 long l_fbavail; 60 long l_ffiles; 61 long l_fffree; 62 linux_fsid_t l_ffsid; 63 long l_fnamelen; 64 long l_fspare[6]; 65 }; 66 67 /* 68 * Structure for uname(2) 69 */ 70 struct linux_utsname { 71 char l_sysname[65]; 72 char l_nodename[65]; 73 char l_release[65]; 74 char l_version[65]; 75 char l_machine[65]; 76 char l_domainname[65]; 77 }; 78 79 struct linux_sigaction { 80 void (*sa_handler)(int); 81 linux_sigset_t sa_mask; 82 unsigned long sa_flags; 83 void (*sa_restorer)(void); 84 }; 85 86 /* 87 * Passed to the mmap() system call 88 */ 89 struct linux_mmap { 90 caddr_t lm_addr; 91 int lm_len; 92 int lm_prot; 93 int lm_flags; 94 int lm_fd; 95 int lm_pos; 96 }; 97 98 /* 99 * Passed to the select() system call 100 */ 101 struct linux_select { 102 int nfds; 103 fd_set *readfds; 104 fd_set *writefds; 105 fd_set *exceptfds; 106 struct timeval *timeout; 107 }; 108 109 struct linux_stat { 110 linux_dev_t lst_dev; 111 unsigned short pad1; 112 linux_ino_t lst_ino; 113 linux_mode_t lst_mode; 114 linux_nlink_t lst_nlink; 115 linux_uid_t lst_uid; 116 linux_gid_t lst_gid; 117 linux_dev_t lst_rdev; 118 unsigned short pad2; 119 linux_off_t lst_size; 120 unsigned long lst_blksize; 121 unsigned long lst_blocks; 122 linux_time_t lst_atime; 123 unsigned long unused1; 124 linux_time_t lst_mtime; 125 unsigned long unused2; 126 linux_time_t lst_ctime; 127 unsigned long unused3; 128 unsigned long unused4; 129 unsigned long unused5; 130 }; 131 132 struct linux_tms { 133 linux_clock_t ltms_utime; 134 linux_clock_t ltms_stime; 135 linux_clock_t ltms_cutime; 136 linux_clock_t ltms_cstime; 137 }; 138 139 struct linux_utimbuf { 140 linux_time_t l_actime; 141 linux_time_t l_modtime; 142 }; 143 144 #endif /* !_LINUX_TYPES_H */ 145