1 /* $NetBSD: linux_types.h,v 1.8 2009/01/11 02:45:48 christos Exp $ */ 2 3 /*- 4 * Copyright (c) 1995, 1998, 2001 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, Eric Haszlakiewicz and Emmanuel Dreyfus. 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 * 19 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29 * POSSIBILITY OF SUCH DAMAGE. 30 */ 31 32 #ifndef _POWERPC_LINUX_TYPES_H 33 #define _POWERPC_LINUX_TYPES_H 34 35 /* 36 * from Linux's include/asm-ppc/posix-types.h 37 */ 38 typedef unsigned int linux_uid_t; 39 typedef unsigned int linux_gid_t; 40 typedef unsigned int linux_dev_t; 41 typedef unsigned int linux_ino_t; 42 typedef unsigned int linux_mode_t; 43 typedef unsigned short linux_nlink_t; 44 typedef long linux_time_t; 45 typedef long linux_suseconds_t; 46 typedef long linux_clock_t; 47 typedef long linux_off_t; 48 typedef int linux_pid_t; 49 50 /* 51 * From Linux's include/asm-ppc/termbits.h 52 */ 53 typedef unsigned char linux_cc_t; 54 typedef unsigned int linux_speed_t; 55 typedef unsigned int linux_tcflag_t; 56 57 /* 58 * From Linux's include/asm-ppc/stat.h 59 */ 60 struct linux_stat { /* warning: there is also a old_kernel_stat in Linux*/ 61 linux_dev_t lst_dev; 62 linux_ino_t lst_ino; 63 linux_mode_t lst_mode; 64 linux_nlink_t lst_nlink; 65 linux_uid_t lst_uid; 66 linux_gid_t lst_gid; 67 linux_dev_t lst_rdev; 68 linux_off_t lst_size; 69 unsigned long lst_blksize; 70 unsigned long lst_blocks; 71 unsigned long lst_atime; 72 unsigned long unused1; 73 unsigned long lst_mtime; 74 unsigned long unused2; 75 unsigned long lst_ctime; 76 unsigned long unused3; 77 unsigned long unused4; 78 unsigned long unused5; 79 }; 80 81 /* 82 * This matches struct stat64 in glibc2.1, hence the absolutely 83 * insane amounts of padding around dev_t's. 84 * 85 * Still from Linux'sinclude/asm-ppc/stat.h 86 */ 87 struct linux_stat64 { 88 unsigned long long lst_dev; 89 unsigned long long lst_ino; 90 unsigned int lst_mode; 91 unsigned int lst_nlink; 92 unsigned int lst_uid; 93 unsigned int lst_gid; 94 unsigned long long lst_rdev; 95 unsigned short int __pad2; 96 long long lst_size; 97 long lst_blksize; 98 long long lst_blocks; /* Number 512-byte blocks allocated. */ 99 long lst_atime; 100 unsigned long int __unused1; 101 long lst_mtime; 102 unsigned long int __unused2; 103 long lst_ctime; 104 unsigned long int __unused3; 105 unsigned long int __unused4; 106 unsigned long int __unused5; 107 }; 108 109 #endif /* !_POWERPC_LINUX_TYPES_H */ 110