Source-Changes-HG archive

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

[src/trunk]: src/sys/fs/ptyfs rename ptyfs_flag -> ptyfs_status to avoid conf...



details:   https://anonhg.NetBSD.org/src/rev/b7934320d451
branches:  trunk
changeset: 782273:b7934320d451
user:      christos <christos%NetBSD.org@localhost>
date:      Wed Oct 24 23:36:15 2012 +0000

description:
rename ptyfs_flag -> ptyfs_status to avoid confusion with ptyfs_flags

diffstat:

 sys/fs/ptyfs/ptyfs.h       |   6 +++---
 sys/fs/ptyfs/ptyfs_subr.c  |   6 +++---
 sys/fs/ptyfs/ptyfs_vnops.c |  28 ++++++++++++++--------------
 3 files changed, 20 insertions(+), 20 deletions(-)

diffs (150 lines):

diff -r e6b31529204c -r b7934320d451 sys/fs/ptyfs/ptyfs.h
--- a/sys/fs/ptyfs/ptyfs.h      Wed Oct 24 22:56:27 2012 +0000
+++ b/sys/fs/ptyfs/ptyfs.h      Wed Oct 24 23:36:15 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ptyfs.h,v 1.9 2012/09/18 21:33:55 christos Exp $       */
+/*     $NetBSD: ptyfs.h,v 1.10 2012/10/24 23:36:15 christos Exp $      */
 
 /*
  * Copyright (c) 1993
@@ -93,7 +93,7 @@
        ptyfstype       ptyfs_type;     /* type of ptyfs node */
        int             ptyfs_pty;      /* the pty index */
        u_long          ptyfs_fileno;   /* unique file id */
-       int             ptyfs_flag;     /* status flag for times */
+       int             ptyfs_status;   /* status flag for times */
 #define        PTYFS_ACCESS    1
 #define        PTYFS_MODIFY    2
 #define        PTYFS_CHANGE    4
@@ -139,7 +139,7 @@
     pty_makedev((ptyfs)->ptyfs_type == PTYFSpts ? 't' : 'p', (ptyfs)->ptyfs_pty)
 
 #define PTYFS_ITIMES(ptyfs, acc, mod, cre) \
-   while ((ptyfs)->ptyfs_flag & (PTYFS_ACCESS|PTYFS_CHANGE|PTYFS_MODIFY)) \
+   while ((ptyfs)->ptyfs_status & (PTYFS_ACCESS|PTYFS_CHANGE|PTYFS_MODIFY)) \
        ptyfs_itimes(ptyfs, acc, mod, cre)
 /*
  * Convert between ptyfsnode vnode
diff -r e6b31529204c -r b7934320d451 sys/fs/ptyfs/ptyfs_subr.c
--- a/sys/fs/ptyfs/ptyfs_subr.c Wed Oct 24 22:56:27 2012 +0000
+++ b/sys/fs/ptyfs/ptyfs_subr.c Wed Oct 24 23:36:15 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ptyfs_subr.c,v 1.24 2012/10/23 23:31:00 christos Exp $ */
+/*     $NetBSD: ptyfs_subr.c,v 1.25 2012/10/24 23:36:15 christos Exp $ */
 
 /*
  * Copyright (c) 1993
@@ -73,7 +73,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ptyfs_subr.c,v 1.24 2012/10/23 23:31:00 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ptyfs_subr.c,v 1.25 2012/10/24 23:36:15 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -174,7 +174,7 @@
        }
 out:
        ptyfs->ptyfs_uid = ptyfs->ptyfs_gid = 0;
-       ptyfs->ptyfs_flag |= PTYFS_CHANGE;
+       ptyfs->ptyfs_status |= PTYFS_CHANGE;
        PTYFS_ITIMES(ptyfs, NULL, NULL, NULL);
        ptyfs->ptyfs_birthtime = ptyfs->ptyfs_mtime =
            ptyfs->ptyfs_atime = ptyfs->ptyfs_ctime;
diff -r e6b31529204c -r b7934320d451 sys/fs/ptyfs/ptyfs_vnops.c
--- a/sys/fs/ptyfs/ptyfs_vnops.c        Wed Oct 24 22:56:27 2012 +0000
+++ b/sys/fs/ptyfs/ptyfs_vnops.c        Wed Oct 24 23:36:15 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ptyfs_vnops.c,v 1.39 2012/03/13 18:40:49 elad Exp $    */
+/*     $NetBSD: ptyfs_vnops.c,v 1.40 2012/10/24 23:36:15 christos Exp $        */
 
 /*
  * Copyright (c) 1993, 1995
@@ -76,7 +76,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ptyfs_vnops.c,v 1.39 2012/03/13 18:40:49 elad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ptyfs_vnops.c,v 1.40 2012/10/24 23:36:15 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -405,7 +405,7 @@
                        ptyfs->ptyfs_flags &= SF_SETTABLE;
                        ptyfs->ptyfs_flags |= (vap->va_flags & UF_SETTABLE);
                }
-               ptyfs->ptyfs_flag |= PTYFS_CHANGE;
+               ptyfs->ptyfs_status |= PTYFS_CHANGE;
        }
 
        /*
@@ -434,15 +434,15 @@
                        return (error);
                if (vap->va_atime.tv_sec != VNOVAL)
                        if (!(vp->v_mount->mnt_flag & MNT_NOATIME))
-                               ptyfs->ptyfs_flag |= PTYFS_ACCESS;
+                               ptyfs->ptyfs_status |= PTYFS_ACCESS;
                if (vap->va_mtime.tv_sec != VNOVAL) {
-                       ptyfs->ptyfs_flag |= PTYFS_CHANGE | PTYFS_MODIFY;
+                       ptyfs->ptyfs_status |= PTYFS_CHANGE | PTYFS_MODIFY;
                        if (vp->v_mount->mnt_flag & MNT_RELATIME)
-                               ptyfs->ptyfs_flag |= PTYFS_ACCESS;
+                               ptyfs->ptyfs_status |= PTYFS_ACCESS;
                }
                if (vap->va_birthtime.tv_sec != VNOVAL)
                        ptyfs->ptyfs_birthtime = vap->va_birthtime;
-               ptyfs->ptyfs_flag |= PTYFS_CHANGE;
+               ptyfs->ptyfs_status |= PTYFS_CHANGE;
                error = ptyfs_update(vp, &vap->va_atime, &vap->va_mtime, 0);
                if (error)
                        return error;
@@ -786,7 +786,7 @@
        if (vp->v_type == VDIR)
                return EISDIR;
 
-       ptyfs->ptyfs_flag |= PTYFS_ACCESS;
+       ptyfs->ptyfs_status |= PTYFS_ACCESS;
        /* hardclock() resolution is good enough for ptyfs */
        getnanotime(&ts);
        (void)ptyfs_update(vp, &ts, &ts, 0);
@@ -817,7 +817,7 @@
        struct ptyfsnode *ptyfs = VTOPTYFS(vp);
        int error;
 
-       ptyfs->ptyfs_flag |= PTYFS_MODIFY;
+       ptyfs->ptyfs_status |= PTYFS_MODIFY;
        getnanotime(&ts);
        (void)ptyfs_update(vp, &ts, &ts, 0);
 
@@ -913,25 +913,25 @@
 {
        struct timespec now;
  
-       KASSERT(ptyfs->ptyfs_flag & (PTYFS_ACCESS|PTYFS_CHANGE|PTYFS_MODIFY));
+       KASSERT(ptyfs->ptyfs_status & (PTYFS_ACCESS|PTYFS_CHANGE|PTYFS_MODIFY));
 
        getnanotime(&now);
-       if (ptyfs->ptyfs_flag & PTYFS_ACCESS) {
+       if (ptyfs->ptyfs_status & PTYFS_ACCESS) {
                if (acc == NULL)
                        acc = &now;
                ptyfs->ptyfs_atime = *acc;
        }
-       if (ptyfs->ptyfs_flag & PTYFS_MODIFY) {
+       if (ptyfs->ptyfs_status & PTYFS_MODIFY) {
                if (mod == NULL)
                        mod = &now;
                ptyfs->ptyfs_mtime = *mod;
        }
-       if (ptyfs->ptyfs_flag & PTYFS_CHANGE) {
+       if (ptyfs->ptyfs_status & PTYFS_CHANGE) {
                if (cre == NULL)
                        cre = &now;
                ptyfs->ptyfs_ctime = *cre;
        }
-       ptyfs->ptyfs_flag &= ~(PTYFS_ACCESS|PTYFS_CHANGE|PTYFS_MODIFY);
+       ptyfs->ptyfs_status &= ~(PTYFS_ACCESS|PTYFS_CHANGE|PTYFS_MODIFY);
 }
 
 /*



Home | Main Index | Thread Index | Old Index