From: Joerg Sonnenberger Date: Sat, 30 Jul 2005 20:29:40 +0000 (+0000) Subject: Move ostat definition from sys/stat.h into emulation43bsd/stat.h. X-Git-Tag: v2.0.1~6444 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/a6feb7029d65e6a9e034c65afcde668cb6071315 Move ostat definition from sys/stat.h into emulation43bsd/stat.h. --- diff --git a/sys/emulation/43bsd/43bsd_stats.c b/sys/emulation/43bsd/43bsd_stats.c index 8fc436f9de..b66e259b91 100644 --- a/sys/emulation/43bsd/43bsd_stats.c +++ b/sys/emulation/43bsd/43bsd_stats.c @@ -37,7 +37,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $DragonFly: src/sys/emulation/43bsd/43bsd_stats.c,v 1.3 2004/09/30 18:59:35 dillon Exp $ + * $DragonFly: src/sys/emulation/43bsd/43bsd_stats.c,v 1.4 2005/07/30 20:29:40 joerg Exp $ * from: DragonFly kern/kern_descrip.c,v 1.16 * from: DragonFly kern/vfs_syscalls.c,v 1.21 * @@ -57,6 +57,8 @@ #include #include +#include + static int compat_43_copyout_stat(struct stat *st, struct ostat *uaddr) { diff --git a/sys/emulation/43bsd/stat.h b/sys/emulation/43bsd/stat.h new file mode 100644 index 0000000000..d31a966b57 --- /dev/null +++ b/sys/emulation/43bsd/stat.h @@ -0,0 +1,61 @@ +/*- + * Copyright (c) 2005 The DragonFly Project. All rights reserved. + * Copyright (c) 1982, 1986, 1989, 1993 + * The Regents of the University of California. All rights reserved. + * (c) UNIX System Laboratories, Inc. + * All or some portions of this file are derived from material licensed + * to the University of California by American Telephone and Telegraph + * Co. or Unix System Laboratories, Inc. and are reproduced herein with + * the permission of UNIX System Laboratories, Inc. + * + * 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. Neither the name of the University 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 REGENTS 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 REGENTS 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. + * + * $DragonFly: src/sys/emulation/43bsd/stat.h,v 1.1 2005/07/30 20:29:40 joerg Exp $ + */ + +#ifndef _EMULATION_43BSD_STAT_H_ +#define _EMULATION_43BSD_STAT_H_ + +#include + +struct ostat { + u_int16_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 */ + 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 /* !_SYS_STAT_H_ */ diff --git a/sys/emulation/linux/i386/syscalls.master b/sys/emulation/linux/i386/syscalls.master index cff1cc85e7..34fb8652aa 100644 --- a/sys/emulation/linux/i386/syscalls.master +++ b/sys/emulation/linux/i386/syscalls.master @@ -1,4 +1,4 @@ - $DragonFly: src/sys/emulation/linux/i386/syscalls.master,v 1.6 2004/11/14 01:41:41 dillon Exp $ + $DragonFly: src/sys/emulation/linux/i386/syscalls.master,v 1.7 2005/07/30 20:29:40 joerg Exp $ ; @(#)syscalls.master 8.1 (Berkeley) 7/19/93 ; $FreeBSD: src/sys/i386/linux/syscalls.master,v 1.30.2.8 2003/01/02 20:41:33 kan Exp $ @@ -30,6 +30,8 @@ #include "linux.h" #include "linux_proto.h" +#include + ; #ifdef's, etc. may be included, and are copied to the output files. 0 UNIMPL LINUX setup diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index cc1def4b38..c109cd1774 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -1,4 +1,4 @@ - $DragonFly: src/sys/kern/syscalls.master,v 1.24 2005/07/23 23:26:50 joerg Exp $ + $DragonFly: src/sys/kern/syscalls.master,v 1.25 2005/07/30 20:29:40 joerg Exp $ ; @(#)syscalls.master 8.2 (Berkeley) 1/13/94 ; $FreeBSD: src/sys/kern/syscalls.master,v 1.72.2.10 2002/07/12 08:22:46 alfred Exp $ @@ -33,6 +33,10 @@ #include #include +#ifdef COMPAT_43 +#include +#endif + ; Reserved/unimplemented system calls in the range 0-150 inclusive ; are reserved for use in future Berkeley releases. ; Additional system calls implemented in vendor and other diff --git a/sys/sys/stat.h b/sys/sys/stat.h index 59459fef68..df7de9409a 100644 --- a/sys/sys/stat.h +++ b/sys/sys/stat.h @@ -33,7 +33,7 @@ * * @(#)stat.h 8.12 (Berkeley) 6/16/95 * $FreeBSD: src/sys/sys/stat.h,v 1.20 1999/12/29 04:24:47 peter Exp $ - * $DragonFly: src/sys/sys/stat.h,v 1.5 2005/07/27 14:35:55 joerg Exp $ + * $DragonFly: src/sys/sys/stat.h,v 1.6 2005/07/30 20:29:40 joerg Exp $ */ #ifndef _SYS_STAT_H_ @@ -53,26 +53,6 @@ #define __dev_t dev_t #endif -#ifndef _POSIX_SOURCE -struct ostat { - u_int16_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 */ - 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 /* !_POSIX_SOURCE */ - struct stat { __dev_t st_dev; /* inode's device */ ino_t st_ino; /* inode's number */