summaryrefslogtreecommitdiff
path: root/sys/compat/linux
diff options
context:
space:
mode:
authorFederico G. Schwindt <fgsch@cvs.openbsd.org>2002-12-16 16:27:42 +0000
committerFederico G. Schwindt <fgsch@cvs.openbsd.org>2002-12-16 16:27:42 +0000
commitb5fc9ce435595003d8568a1e9d29b732b46d7517 (patch)
treeb3714d771085be00027d37047329a3913c95c7e5 /sys/compat/linux
parenteb0a4f2b5f6873610369ed80fbf4cc79eea0b64d (diff)
unbust *stat64. From NetBSD.
deraadt@ ok.
Diffstat (limited to 'sys/compat/linux')
-rw-r--r--sys/compat/linux/linux_file64.c5
-rw-r--r--sys/compat/linux/linux_types.h37
2 files changed, 22 insertions, 20 deletions
diff --git a/sys/compat/linux/linux_file64.c b/sys/compat/linux/linux_file64.c
index 4eb0b2b1ea3..4e4f1213fe0 100644
--- a/sys/compat/linux/linux_file64.c
+++ b/sys/compat/linux/linux_file64.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: linux_file64.c,v 1.3 2002/03/14 01:26:50 millert Exp $ */
+/* $OpenBSD: linux_file64.c,v 1.4 2002/12/16 16:27:41 fgsch Exp $ */
/* $NetBSD: linux_file64.c,v 1.2 2000/12/12 22:24:56 jdolecek Exp $ */
/*-
@@ -101,6 +101,9 @@ bsd_to_linux_stat(bsp, lsp)
lsp->lst_atime = bsp->st_atime;
lsp->lst_mtime = bsp->st_mtime;
lsp->lst_ctime = bsp->st_ctime;
+#if LINUX_STAT64_HAS_BROKEN_ST_INO
+ lsp->__lst_ino = (linux_ino_t)bsp->st_ino;
+#endif
}
/*
diff --git a/sys/compat/linux/linux_types.h b/sys/compat/linux/linux_types.h
index d43783e3880..e38fb34d1dc 100644
--- a/sys/compat/linux/linux_types.h
+++ b/sys/compat/linux/linux_types.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: linux_types.h,v 1.6 2002/10/28 03:39:30 fgsch Exp $ */
+/* $OpenBSD: linux_types.h,v 1.7 2002/12/16 16:27:41 fgsch Exp $ */
/* $NetBSD: linux_types.h,v 1.5 1996/05/20 01:59:28 fvdl Exp $ */
/*
@@ -166,36 +166,35 @@ struct linux___sysctl {
* insane amounts of padding around dev_t's.
*/
struct linux_stat64 {
- unsigned short lst_dev;
- unsigned char __pad0[10];
+ unsigned long long lst_dev;
+ unsigned int __pad1;
- unsigned long lst_ino;
+#define LINUX_STAT64_HAS_BROKEN_ST_INO 1
+ unsigned int __lst_ino;
unsigned int lst_mode;
unsigned int lst_nlink;
- unsigned long lst_uid;
- unsigned long lst_gid;
+ unsigned int lst_uid;
+ unsigned int lst_gid;
- unsigned short lst_rdev;
- unsigned char __pad3[10];
+ unsigned long long lst_rdev;
+ unsigned int __pad2;
long long lst_size;
- unsigned long lst_blksize;
+ unsigned int lst_blksize;
- unsigned long lst_blocks; /* Number 512-byte blocks allocated. */
- unsigned long __pad4; /* future possible st_blocks high bits*/
+ unsigned long long lst_blocks; /* Number 512-byte blocks allocated. */
- unsigned long lst_atime;
- unsigned long __pad5;
+ unsigned int lst_atime;
+ unsigned int __unused1;
- unsigned long lst_mtime;
- unsigned long __pad6;
+ unsigned int lst_mtime;
+ unsigned int __unused2;
- unsigned long lst_ctime;
- unsigned long __pad7; /* will be high 32 bits of ctime someday */
+ unsigned int lst_ctime;
+ unsigned int __unused3; /* will be high 32 bits of ctime someday */
- unsigned long __unused1;
- unsigned long __unused2;
+ unsigned long long lst_ino;
};
#endif /* !_LINUX_TYPES_H */