1 /* $NetBSD: linux_types.h,v 1.4 2002/05/19 18:03:17 jdolecek Exp $ */ 2 3 /*- 4 * Copyright (c) 1995, 1998 The NetBSD Foundation, Inc. 5 * All rights reserved. 6 * 7 * This code is derived from software contributed to The NetBSD Foundation 8 * by Frank van der Linden and Eric Haszlakiewicz. 9 * 10 * Redistribution and use in source and binary forms, with or without 11 * modification, are permitted provided that the following conditions 12 * are met: 13 * 1. Redistributions of source code must retain the above copyright 14 * notice, this list of conditions and the following disclaimer. 15 * 2. Redistributions in binary form must reproduce the above copyright 16 * notice, this list of conditions and the following disclaimer in the 17 * documentation and/or other materials provided with the distribution. 18 * 3. All advertising materials mentioning features or use of this software 19 * must display the following acknowledgement: 20 * This product includes software developed by the NetBSD 21 * Foundation, Inc. and its contributors. 22 * 4. Neither the name of The NetBSD Foundation nor the names of its 23 * contributors may be used to endorse or promote products derived 24 * from this software without specific prior written permission. 25 * 26 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 27 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 28 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 29 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 30 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 31 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 32 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 33 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 34 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 35 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 36 * POSSIBILITY OF SUCH DAMAGE. 37 */ 38 39 #ifndef _M68K_LINUX_TYPES_H 40 #define _M68K_LINUX_TYPES_H 41 42 typedef struct { 43 long val[2]; 44 } linux_fsid_t; 45 46 typedef unsigned short linux_uid_t; 47 typedef unsigned short linux_gid_t; 48 typedef unsigned short linux_dev_t; 49 typedef unsigned long linux_ino_t; 50 typedef unsigned short linux_mode_t; 51 typedef unsigned short linux_nlink_t; 52 typedef long linux_time_t; 53 typedef long linux_clock_t; 54 typedef long linux_off_t; 55 typedef int linux_pid_t; 56 57 /* From linux_termios.h */ 58 typedef unsigned char linux_cc_t; 59 typedef unsigned int linux_speed_t; 60 typedef unsigned int linux_tcflag_t; 61 62 struct linux_statfs { 63 long l_ftype; 64 long l_fbsize; 65 long l_fblocks; 66 long l_fbfree; 67 long l_fbavail; 68 long l_ffiles; 69 long l_fffree; 70 linux_fsid_t l_ffsid; 71 long l_fnamelen; 72 long l_fspare[6]; 73 }; 74 75 struct linux_stat { 76 linux_dev_t lst_dev; 77 unsigned short pad1; 78 linux_ino_t lst_ino; 79 linux_mode_t lst_mode; 80 linux_nlink_t lst_nlink; 81 linux_uid_t lst_uid; 82 linux_gid_t lst_gid; 83 linux_dev_t lst_rdev; 84 unsigned short pad2; 85 linux_off_t lst_size; 86 unsigned long lst_blksize; 87 unsigned long lst_blocks; 88 linux_time_t lst_atime; 89 unsigned long unused1; 90 linux_time_t lst_mtime; 91 unsigned long unused2; 92 linux_time_t lst_ctime; 93 unsigned long unused3; 94 unsigned long unused4; 95 unsigned long unused5; 96 }; 97 98 /* This matches struct stat64 in glibc2.1, hence the absolutely 99 * insane amounts of padding around dev_t's. 100 */ 101 struct linux_stat64 { 102 unsigned short lst_dev; 103 unsigned char __pad0[10]; 104 105 #define LINUX_STAT64_HAS_BROKEN_ST_INO 1 106 unsigned long __lst_ino; 107 unsigned int lst_mode; 108 unsigned int lst_nlink; 109 110 unsigned long lst_uid; 111 unsigned long lst_gid; 112 113 unsigned short lst_rdev; 114 unsigned char __pad3[10]; 115 116 long long lst_size; 117 unsigned long lst_blksize; 118 119 unsigned long lst_blocks; /* Number 512-byte blocks allocated. */ 120 unsigned long __pad4; /* future possible st_blocks high bits */ 121 122 unsigned long lst_atime; 123 unsigned long __pad5; 124 125 unsigned long lst_mtime; 126 unsigned long __pad6; 127 128 unsigned long lst_ctime; 129 unsigned long __pad7; /* will be high 32 bits of ctime someday */ 130 131 unsigned long long lst_ino; 132 }; 133 134 #endif /* !_M68K_LINUX_TYPES_H */ 135