Source-Changes-HG archive

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

[src/trunk]: src/sys/msdosfs msdosfs_getattr(): do not report archived files ...



details:   https://anonhg.NetBSD.org/src/rev/051cacf86bbd
branches:  trunk
changeset: 495523:051cacf86bbd
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Sun Jul 30 20:16:48 2000 +0000

description:
msdosfs_getattr(): do not report archived files (those with ATTR_ARCHIVE unset)
as having flag SF_ARCHIVED on; this is wrong for directories, which don't
have any mode flags on msdosfs, so it's always treated as archived,
which leads to problems described in pr #8439. The semantics of the
archive flag differs between Unix and msdos/windoze, so it's better
to not set the flag at all even for regular files, to avoid surprises.

This fixes bin/8439 by Thomas Klausner.

diffstat:

 sys/msdosfs/msdosfs_vnops.c |  6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diffs (21 lines):

diff -r b077b7b5d017 -r 051cacf86bbd sys/msdosfs/msdosfs_vnops.c
--- a/sys/msdosfs/msdosfs_vnops.c       Sun Jul 30 17:26:14 2000 +0000
+++ b/sys/msdosfs/msdosfs_vnops.c       Sun Jul 30 20:16:48 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: msdosfs_vnops.c,v 1.101 2000/07/25 22:15:00 jdolecek Exp $     */
+/*     $NetBSD: msdosfs_vnops.c,v 1.102 2000/07/30 20:16:48 jdolecek Exp $     */
 
 /*-
  * Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank.
@@ -331,10 +331,8 @@
                vap->va_ctime = vap->va_mtime;
        }
        vap->va_flags = 0;
-       if ((dep->de_Attributes & ATTR_ARCHIVE) == 0) {
-               vap->va_flags |= SF_ARCHIVED;
+       if ((dep->de_Attributes & ATTR_ARCHIVE) == 0)
                vap->va_mode  |= S_ARCH1;
-       }
        vap->va_gen = 0;
        vap->va_blocksize = pmp->pm_bpcluster;
        vap->va_bytes =



Home | Main Index | Thread Index | Old Index