47a35be2c9
This gets most existing m68k a.out binaries working with m68k ELF kernels. There are still some remaining ABI issues to track down; most notably, some ioctl(2) calls are affected by the change.
108 lines
4.6 KiB
C
108 lines
4.6 KiB
C
/* $NetBSD: aoutm68k_stat.h,v 1.1 2000/12/02 20:40:04 scw Exp $ */
|
|
|
|
/*-
|
|
* Copyright (c) 2000 The NetBSD Foundation, Inc.
|
|
* All rights reserved.
|
|
*
|
|
* This code is derived from software contributed to The NetBSD Foundation
|
|
* by Steve C. Woodford.
|
|
*
|
|
* Redistribution and use in source and binary forms, with or without
|
|
* modification, are permitted provided that the following conditions
|
|
* are met:
|
|
* 1. Redistributions of source code must retain the above copyright
|
|
* notice, this list of conditions and the following disclaimer.
|
|
* 2. Redistributions in binary form must reproduce the above copyright
|
|
* notice, this list of conditions and the following disclaimer in the
|
|
* documentation and/or other materials provided with the distribution.
|
|
* 3. All advertising materials mentioning features or use of this software
|
|
* must display the following acknowledgement:
|
|
* This product includes software developed by the NetBSD
|
|
* Foundation, Inc. and its contributors.
|
|
* 4. Neither the name of The NetBSD Foundation nor the names of its
|
|
* contributors may be used to endorse or promote products derived
|
|
* from this software without specific prior written permission.
|
|
*
|
|
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
|
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
|
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
|
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
* POSSIBILITY OF SUCH DAMAGE.
|
|
*/
|
|
|
|
#ifndef _AOUTM68K_STAT_H
|
|
#define _AOUTM68K_STAT_H
|
|
|
|
#pragma pack(2)
|
|
|
|
#ifdef COMPAT_43
|
|
struct aoutm68k_stat43 {
|
|
u_int16_t st_dev; /* inode's device */
|
|
ino_t st_ino; /* inode's number */
|
|
u_int16_t st_mode; /* inode protection mode */
|
|
u_int16_t st_nlink; /* number of hard links */
|
|
u_int16_t st_uid; /* user ID of the file's owner */
|
|
u_int16_t st_gid; /* group ID of the file's group */
|
|
u_int16_t st_rdev; /* device type */
|
|
int32_t st_size; /* file size, in bytes */
|
|
struct timespec st_atimespec;/* time of last access */
|
|
struct timespec st_mtimespec;/* time of last data modification */
|
|
struct timespec st_ctimespec;/* time of last file status change */
|
|
int32_t st_blksize; /* optimal blocksize for I/O */
|
|
int32_t st_blocks; /* blocks allocated for file */
|
|
u_int32_t st_flags; /* user defined flags for file */
|
|
u_int32_t st_gen; /* file generation number */
|
|
};
|
|
#endif
|
|
|
|
#ifdef COMPAT_12
|
|
struct aoutm68k_stat12 {
|
|
dev_t st_dev; /* inode's device */
|
|
ino_t st_ino; /* inode's number */
|
|
u_int16_t st_mode; /* inode protection mode */
|
|
u_int16_t st_nlink; /* number of hard links */
|
|
uid_t st_uid; /* user ID of the file's owner */
|
|
gid_t st_gid; /* group ID of the file's group */
|
|
dev_t st_rdev; /* device type */
|
|
struct timespec st_atimespec;/* time of last access */
|
|
struct timespec st_mtimespec;/* time of last data modification */
|
|
struct timespec st_ctimespec;/* time of last file status change */
|
|
off_t st_size; /* file size, in bytes */
|
|
int64_t st_blocks; /* blocks allocated for file */
|
|
u_int32_t st_blksize; /* optimal blocksize for I/O */
|
|
u_int32_t st_flags; /* user defined flags for file */
|
|
u_int32_t st_gen; /* file generation number */
|
|
int32_t st_lspare;
|
|
int64_t st_qspare[2];
|
|
};
|
|
#endif
|
|
|
|
struct aoutm68k_stat {
|
|
dev_t st_dev; /* inode's device */
|
|
ino_t st_ino; /* inode's number */
|
|
mode_t st_mode; /* inode protection mode */
|
|
nlink_t st_nlink; /* number of hard links */
|
|
uid_t st_uid; /* user ID of the file's owner */
|
|
gid_t st_gid; /* group ID of the file's group */
|
|
dev_t st_rdev; /* device type */
|
|
struct timespec st_atimespec;/* time of last access */
|
|
struct timespec st_mtimespec;/* time of last data modification */
|
|
struct timespec st_ctimespec;/* time of last file status change */
|
|
off_t st_size; /* file size, in bytes */
|
|
blkcnt_t st_blocks; /* blocks allocated for file */
|
|
blksize_t st_blksize; /* optimal blocksize for I/O */
|
|
u_int32_t st_flags; /* user defined flags for file */
|
|
u_int32_t st_gen; /* file generation number */
|
|
int64_t st_qspare[2];
|
|
};
|
|
|
|
#pragma pack()
|
|
|
|
#endif /* _AOUTM68K_STAT_H */
|