Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/ufs/ffs move the new ffs_itimes() to a berr place -- ffs...



details:   https://anonhg.NetBSD.org/src/rev/6dcaa9a9a655
branches:  trunk
changeset: 584301:6dcaa9a9a655
user:      drochner <drochner%NetBSD.org@localhost>
date:      Mon Sep 12 20:09:59 2005 +0000

description:
move the new ffs_itimes() to a berr place -- ffs_subr.c is shared with
userland

diffstat:

 sys/ufs/ffs/ffs_inode.c |  37 +++++++++++++++++++++++++++++++++++--
 sys/ufs/ffs/ffs_subr.c  |  37 ++-----------------------------------
 2 files changed, 37 insertions(+), 37 deletions(-)

diffs (110 lines):

diff -r d36eed3907a5 -r 6dcaa9a9a655 sys/ufs/ffs/ffs_inode.c
--- a/sys/ufs/ffs/ffs_inode.c   Mon Sep 12 19:56:58 2005 +0000
+++ b/sys/ufs/ffs/ffs_inode.c   Mon Sep 12 20:09:59 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ffs_inode.c,v 1.73 2005/09/12 16:24:41 christos Exp $  */
+/*     $NetBSD: ffs_inode.c,v 1.74 2005/09/12 20:09:59 drochner Exp $  */
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ffs_inode.c,v 1.73 2005/09/12 16:24:41 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ffs_inode.c,v 1.74 2005/09/12 20:09:59 drochner Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_ffs.h"
@@ -648,3 +648,36 @@
        *countp = blocksreleased;
        return (allerror);
 }
+
+void
+ffs_itimes(struct inode *ip, const struct timespec *acc,
+    const struct timespec *mod, const struct timespec *cre)
+{
+       struct timespec *ts = NULL, tsb;
+       if (ip->i_flag & IN_ACCESS) {
+               if (acc == NULL)
+                       acc = ts == NULL ? (ts = nanotime(&tsb)) : ts;
+               DIP_ASSIGN(ip, atime, acc->tv_sec);
+               DIP_ASSIGN(ip, atimensec, acc->tv_nsec);
+       }
+       if (ip->i_flag & (IN_UPDATE | IN_MODIFY)) {
+               if ((ip->i_flags & SF_SNAPSHOT) == 0) {
+                       if (mod == NULL)
+                               mod = ts == NULL ? (ts = nanotime(&tsb)) : ts;
+                       DIP_ASSIGN(ip, mtime, mod->tv_sec);
+                       DIP_ASSIGN(ip, mtimensec, mod->tv_nsec);
+               }
+               ip->i_modrev++;
+       }
+       if (ip->i_flag & (IN_CHANGE | IN_MODIFY)) {
+               if (cre == NULL)
+                       cre = ts == NULL ? (ts = nanotime(&tsb)) : ts;
+               DIP_ASSIGN(ip, ctime, cre->tv_sec);
+               DIP_ASSIGN(ip, ctimensec, cre->tv_nsec);
+       }
+       if (ip->i_flag & (IN_ACCESS | IN_MODIFY))
+               ip->i_flag |= IN_ACCESSED;
+       if (ip->i_flag & (IN_UPDATE | IN_CHANGE))
+               ip->i_flag |= IN_MODIFIED;
+       ip->i_flag &= ~(IN_ACCESS | IN_CHANGE | IN_UPDATE | IN_MODIFY);
+}
diff -r d36eed3907a5 -r 6dcaa9a9a655 sys/ufs/ffs/ffs_subr.c
--- a/sys/ufs/ffs/ffs_subr.c    Mon Sep 12 19:56:58 2005 +0000
+++ b/sys/ufs/ffs/ffs_subr.c    Mon Sep 12 20:09:59 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ffs_subr.c,v 1.36 2005/09/12 16:24:41 christos Exp $   */
+/*     $NetBSD: ffs_subr.c,v 1.37 2005/09/12 20:09:59 drochner Exp $   */
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -36,7 +36,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ffs_subr.c,v 1.36 2005/09/12 16:24:41 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ffs_subr.c,v 1.37 2005/09/12 20:09:59 drochner Exp $");
 
 #include <sys/param.h>
 
@@ -326,36 +326,3 @@
                    (int)fs->fs_fragshift);
        }
 }
-
-void
-ffs_itimes(struct inode *ip, const struct timespec *acc,
-    const struct timespec *mod, const struct timespec *cre)
-{
-       struct timespec *ts = NULL, tsb;
-       if (ip->i_flag & IN_ACCESS) {
-               if (acc == NULL)
-                       acc = ts == NULL ? (ts = nanotime(&tsb)) : ts;
-               DIP_ASSIGN(ip, atime, acc->tv_sec);
-               DIP_ASSIGN(ip, atimensec, acc->tv_nsec);
-       }
-       if (ip->i_flag & (IN_UPDATE | IN_MODIFY)) {
-               if ((ip->i_flags & SF_SNAPSHOT) == 0) {
-                       if (mod == NULL)
-                               mod = ts == NULL ? (ts = nanotime(&tsb)) : ts;
-                       DIP_ASSIGN(ip, mtime, mod->tv_sec);
-                       DIP_ASSIGN(ip, mtimensec, mod->tv_nsec);
-               }
-               ip->i_modrev++;
-       }
-       if (ip->i_flag & (IN_CHANGE | IN_MODIFY)) {
-               if (cre == NULL)
-                       cre = ts == NULL ? (ts = nanotime(&tsb)) : ts;
-               DIP_ASSIGN(ip, ctime, cre->tv_sec);
-               DIP_ASSIGN(ip, ctimensec, cre->tv_nsec);
-       }
-       if (ip->i_flag & (IN_ACCESS | IN_MODIFY))
-               ip->i_flag |= IN_ACCESSED;
-       if (ip->i_flag & (IN_UPDATE | IN_CHANGE))
-               ip->i_flag |= IN_MODIFIED;
-       ip->i_flag &= ~(IN_ACCESS | IN_CHANGE | IN_UPDATE | IN_MODIFY);
-}



Home | Main Index | Thread Index | Old Index