Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-2]: src/sys/fs/msdosfs Pull up following revision(s) (requested b...
details: https://anonhg.NetBSD.org/src/rev/3f47db2461e3
branches: netbsd-2
changeset: 564333:3f47db2461e3
user: riz <riz%NetBSD.org@localhost>
date: Sun Nov 06 00:46:50 2005 +0000
description:
Pull up following revision(s) (requested by christos in ticket #5972):
sys/fs/msdosfs/denode.h: revision 1.10
sys/fs/msdosfs/msdosfs_vnops.c: revision 1.22
PR/32003: Brian Buhrow: msdosfs doesn't properly zero out high cluster data
on non-FAT32 msdos filesystems.
diffstat:
sys/fs/msdosfs/denode.h | 6 ++++--
sys/fs/msdosfs/msdosfs_vnops.c | 9 +++++++--
2 files changed, 11 insertions(+), 4 deletions(-)
diffs (64 lines):
diff -r d31026659ddc -r 3f47db2461e3 sys/fs/msdosfs/denode.h
--- a/sys/fs/msdosfs/denode.h Sun Nov 06 00:43:11 2005 +0000
+++ b/sys/fs/msdosfs/denode.h Sun Nov 06 00:46:50 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: denode.h,v 1.4.6.1 2005/09/06 16:12:00 riz Exp $ */
+/* $NetBSD: denode.h,v 1.4.6.2 2005/11/06 00:46:50 riz Exp $ */
/*-
* Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank.
@@ -202,6 +202,8 @@
#define DE_EXTERNALIZE32(dp, dep) \
putushort((dp)->deHighClust, (dep)->de_StartCluster >> 16)
+#define DE_EXTERNALIZE16(dp, dep) \
+ putushort((dp)->deHighClust, 0)
#define DE_EXTERNALIZE(dp, dep) \
(memcpy((dp)->deName, (dep)->de_Name, 11), \
(dp)->deAttributes = (dep)->de_Attributes, \
@@ -214,7 +216,7 @@
putushort((dp)->deStartCluster, (dep)->de_StartCluster), \
putulong((dp)->deFileSize, \
((dep)->de_Attributes & ATTR_DIRECTORY) ? 0 : (dep)->de_FileSize), \
- (FAT32((dep)->de_pmp) ? DE_EXTERNALIZE32((dp), (dep)) : 0))
+ (FAT32((dep)->de_pmp) ? DE_EXTERNALIZE32((dp), (dep)) : DE_EXTERNALIZE16((dp), (dep))))
#define de_forw de_chain[0]
#define de_back de_chain[1]
diff -r d31026659ddc -r 3f47db2461e3 sys/fs/msdosfs/msdosfs_vnops.c
--- a/sys/fs/msdosfs/msdosfs_vnops.c Sun Nov 06 00:43:11 2005 +0000
+++ b/sys/fs/msdosfs/msdosfs_vnops.c Sun Nov 06 00:46:50 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: msdosfs_vnops.c,v 1.9.4.1 2005/09/06 16:12:00 riz Exp $ */
+/* $NetBSD: msdosfs_vnops.c,v 1.9.4.2 2005/11/06 00:46:50 riz Exp $ */
/*-
* Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank.
@@ -48,7 +48,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: msdosfs_vnops.c,v 1.9.4.1 2005/09/06 16:12:00 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: msdosfs_vnops.c,v 1.9.4.2 2005/11/06 00:46:50 riz Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -1145,6 +1145,8 @@
if (FAT32(pmp)) {
putushort(dotdotp->deHighClust,
dp->de_StartCluster >> 16);
+ } else {
+ putushort(dotdotp->deHighClust, 0);
}
if ((error = bwrite(bp)) != 0) {
/* XXX should really panic here, fs is corrupt */
@@ -1272,6 +1274,9 @@
if (FAT32(pmp)) {
putushort(denp[0].deHighClust, newcluster >> 16);
putushort(denp[1].deHighClust, pdep->de_StartCluster >> 16);
+ } else {
+ putushort(denp[0].deHighClust, 0);
+ putushort(denp[1].deHighClust, 0);
}
if (async)
Home |
Main Index |
Thread Index |
Old Index