Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 3 Dec 2006 11:04:45 GMT
From:      Rene Ladan<r.c.ladan@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/106255: [msdosfs] : correct setting of archive flag
Message-ID:  <200612031104.kB3B4jcS098474@www.freebsd.org>
Resent-Message-ID: <200612031110.kB3BAAwZ060706@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         106255
>Category:       kern
>Synopsis:       [msdosfs] : correct setting of archive flag
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Dec 03 11:10:10 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Rene Ladan
>Release:        7.0 CURRENT 2006-11-26
>Organization:
>Environment:
FreeBSD s000655.campus.tue.nl 7.0-CURRENT FreeBSD 7.0-CURRENT #21: Mon Nov 27 17:53:03 CET 2006     root@s000655.campus.tue.nl:/usr/obj/usr/src-current/sys/RENE  i386

>Description:
The MSDOS file system has an archive bit in the flags field.  This bit roughly corresponds to the archive flag on the UFS file system.  However, it is set the wrong way around: the flag should be set when the bit is present, and cleared when the bit is absent.
>How-To-Repeat:
1. Mount an MSDOS file system with some files marked as archived, and some not.
2. List its files with 'ls -lo'
   The archive flag will turn up inversed.

>Fix:


Patch attached with submission follows:

--- msdosfs_vnops.c	Mon Nov  6 14:41:57 2006
+++ msdosfs_vnops.c.rene	Sun Dec  3 11:58:47 2006
@@ -352,7 +352,7 @@
 		vap->va_ctime = vap->va_mtime;
 	}
 	vap->va_flags = 0;
-	if ((dep->de_Attributes & ATTR_ARCHIVE) == 0)
+	if (dep->de_Attributes & ATTR_ARCHIVE)
 		vap->va_flags |= SF_ARCHIVED;
 	vap->va_gen = 0;
 	vap->va_blocksize = pmp->pm_bpcluster;

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200612031104.kB3B4jcS098474>