1 /* $NetBSD: aoutm68k_stat.h,v 1.5 2005/12/11 12:19:56 christos Exp $ */ 2 3 /*- 4 * Copyright (c) 2000 The NetBSD Foundation, Inc. 5 * All rights reserved. 6 * 7 * This code is derived from software contributed to The NetBSD Foundation 8 * by Steve C. Woodford. 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 _AOUTM68K_STAT_H 40 #define _AOUTM68K_STAT_H 41 42 #ifdef _KERNEL_OPT 43 #include "opt_compat_43.h" 44 #endif 45 46 #pragma pack(2) 47 48 #ifdef COMPAT_43 49 struct aoutm68k_stat43 { 50 u_int16_t st_dev; /* inode's device */ 51 u_int32_t st_ino; /* inode's number */ 52 u_int16_t st_mode; /* inode protection mode */ 53 u_int16_t st_nlink; /* number of hard links */ 54 u_int16_t st_uid; /* user ID of the file's owner */ 55 u_int16_t st_gid; /* group ID of the file's group */ 56 u_int16_t st_rdev; /* device type */ 57 int32_t st_size; /* file size, in bytes */ 58 struct timespec st_atimespec;/* time of last access */ 59 struct timespec st_mtimespec;/* time of last data modification */ 60 struct timespec st_ctimespec;/* time of last file status change */ 61 int32_t st_blksize; /* optimal blocksize for I/O */ 62 int32_t st_blocks; /* blocks allocated for file */ 63 u_int32_t st_flags; /* user defined flags for file */ 64 u_int32_t st_gen; /* file generation number */ 65 }; 66 #endif 67 68 #ifdef COMPAT_12 69 struct aoutm68k_stat12 { 70 dev_t st_dev; /* inode's device */ 71 u_int32_t st_ino; /* inode's number */ 72 u_int16_t st_mode; /* inode protection mode */ 73 u_int16_t st_nlink; /* number of hard links */ 74 uid_t st_uid; /* user ID of the file's owner */ 75 gid_t st_gid; /* group ID of the file's group */ 76 dev_t st_rdev; /* device type */ 77 struct timespec st_atimespec;/* time of last access */ 78 struct timespec st_mtimespec;/* time of last data modification */ 79 struct timespec st_ctimespec;/* time of last file status change */ 80 off_t st_size; /* file size, in bytes */ 81 int64_t st_blocks; /* blocks allocated for file */ 82 u_int32_t st_blksize; /* optimal blocksize for I/O */ 83 u_int32_t st_flags; /* user defined flags for file */ 84 u_int32_t st_gen; /* file generation number */ 85 int32_t st_lspare; 86 int64_t st_qspare[2]; 87 }; 88 #endif 89 90 struct aoutm68k_stat { 91 dev_t st_dev; /* inode's device */ 92 u_int32_t st_ino; /* inode's number */ 93 mode_t st_mode; /* inode protection mode */ 94 nlink_t st_nlink; /* number of hard links */ 95 uid_t st_uid; /* user ID of the file's owner */ 96 gid_t st_gid; /* group ID of the file's group */ 97 dev_t st_rdev; /* device type */ 98 struct timespec st_atimespec;/* time of last access */ 99 struct timespec st_mtimespec;/* time of last data modification */ 100 struct timespec st_ctimespec;/* time of last file status change */ 101 off_t st_size; /* file size, in bytes */ 102 blkcnt_t st_blocks; /* blocks allocated for file */ 103 blksize_t st_blksize; /* optimal blocksize for I/O */ 104 u_int32_t st_flags; /* user defined flags for file */ 105 u_int32_t st_gen; /* file generation number */ 106 int64_t st_qspare[2]; 107 }; 108 109 #pragma pack() 110 111 #endif /* _AOUTM68K_STAT_H */ 112