kern/142558: Minor updates to fs/msdosfs headers (from NetBSD)

Pedro F. Giffuni giffunip at tutopia.com
Sun Jan 10 01:40:02 UTC 2010


>Number:         142558
>Category:       kern
>Synopsis:       Minor updates to fs/msdosfs headers (from NetBSD)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jan 10 01:40:01 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Pedro F. Giffuni
>Release:        8.0-RELEASE
>Organization:
>Environment:
FreeBSD mogwai.giffuni.net 8.0-RELEASE FreeBSD 8.0-RELEASE #12: Tue Dec  1 23:31:27 UTC 2009     pedro at mogwai.giffuni.net:/usr/src/sys/i386/compile/GENERIC  i386

>Description:
These are just some minor updates to some system headers and a typo.
Maybe this minimal sync will help resurrect the "msdosfs header
unification patch".
>How-To-Repeat:
Just for reference:
http://lists.freebsd.org/pipermail/freebsd-fs/2007-July/003514.html
(Look at the mail thread, not just the patch)
>Fix:
diff -ru msdosfs.orig/bootsect.h msdosfs/bootsect.h
--- msdosfs.orig/bootsect.h	2010-01-09 19:29:45.000000000 +0000
+++ msdosfs/bootsect.h	2010-01-09 19:33:57.000000000 +0000
@@ -16,6 +16,8 @@
  *
  * October 1992
  */
+#ifndef _MSDOSFS_BOOTSECT_H_
+#define _MSDOSFS_BOOTSECT_H_
 
 /*
  * Format of a boot sector.  This is the first sector on a DOS floppy disk
@@ -91,3 +93,5 @@
 #define	bsHiddenSecs	bsBPB.bpbHiddenSecs
 #define	bsHugeSectors	bsBPB.bpbHugeSectors
 #endif
+
+#endif /* _MSDOSFS_BOOTSECT_H_ */
diff -ru msdosfs.orig/bpb.h msdosfs/bpb.h
--- msdosfs.orig/bpb.h	2010-01-09 19:29:45.000000000 +0000
+++ msdosfs/bpb.h	2010-01-09 19:42:32.000000000 +0000
@@ -17,6 +17,9 @@
  * October 1992
  */
 
+#ifndef _MSDOSFS_BPB_H_
+#define _MSDOSFS_BPB_H_
+
 /*
  * BIOS Parameter Block (BPB) for DOS 3.3
  */
@@ -78,7 +81,7 @@
 	u_int32_t	bpbRootClust;	/* start cluster for root directory */
 	u_int16_t	bpbFSInfo;	/* filesystem info structure sector */
 	u_int16_t	bpbBackup;	/* backup boot sector */
-	/* There is a 12 byte filler here, but we ignore it */
+	u_int8_t	bpbReserved[12]; /* Reserved for future expansion */
 };
 
 /*
@@ -153,7 +156,7 @@
 	u_int8_t bpbRootClust[4];	/* start cluster for root directory */
 	u_int8_t bpbFSInfo[2];		/* filesystem info structure sector */
 	u_int8_t bpbBackup[2];		/* backup boot sector */
-	/* There is a 12 byte filler here, but we ignore it */
+	u_int8_t bpbReserved[12];	/* Reserved for future expansion */
 };
 
 /*
@@ -168,3 +171,4 @@
 	u_int8_t fsifill2[12];
 	u_int8_t fsisig3[4];
 };
+#endif /* _MSDOSFS_BPB_H_ */
diff -ru msdosfs.orig/msdosfs_fat.c msdosfs/msdosfs_fat.c
--- msdosfs.orig/msdosfs_fat.c	2010-01-09 19:29:45.000000000 +0000
+++ msdosfs/msdosfs_fat.c	2010-01-09 19:57:55.000000000 +0000
@@ -373,7 +373,7 @@
 		 * other fats and then writing them back out.  This could tie up
 		 * the fat for quite a while. Preventing others from accessing it.
 		 * To prevent us from going after the fat quite so much we use
-		 * delayed writes, unless they specfied "synchronous" when the
+		 * delayed writes, unless they specified "synchronous" when the
 		 * filesystem was mounted.  If synch is asked for then use
 		 * bwrite()'s and really slow things down.
 		 */


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


More information about the freebsd-bugs mailing list