summaryrefslogtreecommitdiff
path: root/sys/compat/linux/common
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>2005-03-10 14:12:27 +0000
committerchristos <christos@NetBSD.org>2005-03-10 14:12:27 +0000
commit47e40fce3a28bef84be109b3fd84164a658a4eaf (patch)
tree20028cfdecf8f87b658cac92ae1501ca6d3dc8a7 /sys/compat/linux/common
parent62d47f2703c23c87e0bbc36f70ad9804e7f00cd6 (diff)
Add nanosecond handling on the stat and stat64 code for the i386.
Diffstat (limited to 'sys/compat/linux/common')
-rw-r--r--sys/compat/linux/common/linux_file.c9
-rw-r--r--sys/compat/linux/common/linux_file64.c9
2 files changed, 14 insertions, 4 deletions
diff --git a/sys/compat/linux/common/linux_file.c b/sys/compat/linux/common/linux_file.c
index 536e00c73ef..5807e8ac7b8 100644
--- a/sys/compat/linux/common/linux_file.c
+++ b/sys/compat/linux/common/linux_file.c
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_file.c,v 1.65 2005/02/26 23:10:19 perry Exp $ */
+/* $NetBSD: linux_file.c,v 1.66 2005/03/10 14:12:28 christos Exp $ */
/*-
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_file.c,v 1.65 2005/02/26 23:10:19 perry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_file.c,v 1.66 2005/03/10 14:12:28 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -515,6 +515,11 @@ bsd_to_linux_stat(bsp, lsp)
lsp->lst_atime = bsp->st_atime;
lsp->lst_mtime = bsp->st_mtime;
lsp->lst_ctime = bsp->st_ctime;
+#ifdef LINUX_STAT_HAS_NSEC
+ lsp->lst_atime_nsec = bsp->st_atimensec;
+ lsp->lst_mtime_nsec = bsp->st_mtimensec;
+ lsp->lst_ctime_nsec = bsp->st_ctimensec;
+#endif
}
/*
diff --git a/sys/compat/linux/common/linux_file64.c b/sys/compat/linux/common/linux_file64.c
index 3771dd0e1e1..4cf67633183 100644
--- a/sys/compat/linux/common/linux_file64.c
+++ b/sys/compat/linux/common/linux_file64.c
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_file64.c,v 1.24 2005/02/26 23:10:19 perry Exp $ */
+/* $NetBSD: linux_file64.c,v 1.25 2005/03/10 14:12:28 christos Exp $ */
/*-
* Copyright (c) 1995, 1998, 2000 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_file64.c,v 1.24 2005/02/26 23:10:19 perry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_file64.c,v 1.25 2005/03/10 14:12:28 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -105,6 +105,11 @@ bsd_to_linux_stat(bsp, lsp)
lsp->lst_atime = bsp->st_atime;
lsp->lst_mtime = bsp->st_mtime;
lsp->lst_ctime = bsp->st_ctime;
+#ifdef LINUX_STAT64_HAS_NSEC
+ lsp->lst_atime_nsec = bsp->st_atimensec;
+ lsp->lst_mtime_nsec = bsp->st_mtimensec;
+ lsp->lst_ctime_nsec = bsp->st_ctimensec;
+#endif
#if LINUX_STAT64_HAS_BROKEN_ST_INO
lsp->__lst_ino = (linux_ino_t) bsp->st_ino;
#endif