xref: /netbsd/sys/compat/aoutm68k/aoutm68k_stat.h (revision bf9ec67e)
1 /*	$NetBSD: aoutm68k_stat.h,v 1.1 2000/12/02 20:40:04 scw 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 #pragma pack(2)
43 
44 #ifdef COMPAT_43
45 struct aoutm68k_stat43 {
46 	u_int16_t st_dev;		/* inode's device */
47 	ino_t	  st_ino;		/* inode's number */
48 	u_int16_t st_mode;		/* inode protection mode */
49 	u_int16_t st_nlink;		/* number of hard links */
50 	u_int16_t st_uid;		/* user ID of the file's owner */
51 	u_int16_t st_gid;		/* group ID of the file's group */
52 	u_int16_t st_rdev;		/* device type */
53 	int32_t	  st_size;		/* file size, in bytes */
54 	struct	  timespec st_atimespec;/* time of last access */
55 	struct	  timespec st_mtimespec;/* time of last data modification */
56 	struct	  timespec st_ctimespec;/* time of last file status change */
57 	int32_t	  st_blksize;		/* optimal blocksize for I/O */
58 	int32_t	  st_blocks;		/* blocks allocated for file */
59 	u_int32_t st_flags;		/* user defined flags for file */
60 	u_int32_t st_gen;		/* file generation number */
61 };
62 #endif
63 
64 #ifdef COMPAT_12
65 struct aoutm68k_stat12 {
66 	dev_t	  st_dev;		/* inode's device */
67 	ino_t	  st_ino;		/* inode's number */
68 	u_int16_t st_mode;		/* inode protection mode */
69 	u_int16_t st_nlink;		/* number of hard links */
70 	uid_t	  st_uid;		/* user ID of the file's owner */
71 	gid_t	  st_gid;		/* group ID of the file's group */
72 	dev_t	  st_rdev;		/* device type */
73 	struct	  timespec st_atimespec;/* time of last access */
74 	struct	  timespec st_mtimespec;/* time of last data modification */
75 	struct	  timespec st_ctimespec;/* time of last file status change */
76 	off_t	  st_size;		/* file size, in bytes */
77 	int64_t	  st_blocks;		/* blocks allocated for file */
78 	u_int32_t st_blksize;		/* optimal blocksize for I/O */
79 	u_int32_t st_flags;		/* user defined flags for file */
80 	u_int32_t st_gen;		/* file generation number */
81 	int32_t	  st_lspare;
82 	int64_t	  st_qspare[2];
83 };
84 #endif
85 
86 struct aoutm68k_stat {
87 	dev_t	  st_dev;		/* inode's device */
88 	ino_t	  st_ino;		/* inode's number */
89 	mode_t	  st_mode;		/* inode protection mode */
90 	nlink_t	  st_nlink;		/* number of hard links */
91 	uid_t	  st_uid;		/* user ID of the file's owner */
92 	gid_t	  st_gid;		/* group ID of the file's group */
93 	dev_t	  st_rdev;		/* device type */
94 	struct	  timespec st_atimespec;/* time of last access */
95 	struct	  timespec st_mtimespec;/* time of last data modification */
96 	struct	  timespec st_ctimespec;/* time of last file status change */
97 	off_t	  st_size;		/* file size, in bytes */
98 	blkcnt_t  st_blocks;		/* blocks allocated for file */
99 	blksize_t st_blksize;		/* optimal blocksize for I/O */
100 	u_int32_t st_flags;		/* user defined flags for file */
101 	u_int32_t st_gen;		/* file generation number */
102 	int64_t	  st_qspare[2];
103 };
104 
105 #pragma pack()
106 
107 #endif /* _AOUTM68K_STAT_H */
108