svn commit: r229232 - stable/9/sys/fs/msdosfs

Konstantin Belousov kib at FreeBSD.org
Sun Jan 1 23:17:09 UTC 2012


Author: kib
Date: Sun Jan  1 23:17:08 2012
New Revision: 229232
URL: http://svn.freebsd.org/changeset/base/229232

Log:
  MFC r227817:
  Put all the messages from msdosfs under the MSDOSFS_DEBUG ifdef.

Modified:
  stable/9/sys/fs/msdosfs/msdosfs_conv.c
  stable/9/sys/fs/msdosfs/msdosfs_denode.c
  stable/9/sys/fs/msdosfs/msdosfs_fat.c
  stable/9/sys/fs/msdosfs/msdosfs_lookup.c
  stable/9/sys/fs/msdosfs/msdosfs_vfsops.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/fs/msdosfs/msdosfs_conv.c
==============================================================================
--- stable/9/sys/fs/msdosfs/msdosfs_conv.c	Sun Jan  1 23:12:56 2012	(r229231)
+++ stable/9/sys/fs/msdosfs/msdosfs_conv.c	Sun Jan  1 23:17:08 2012	(r229232)
@@ -1052,8 +1052,10 @@ mbnambuf_write(struct mbnambuf *nbp, cha
 	size_t count, newlen;
 
 	if (nbp->nb_len != 0 && id != nbp->nb_last_id - 1) {
+#ifdef MSDOSFS_DEBUG
 		printf("msdosfs: non-decreasing id: id %d, last id %d\n",
 		    id, nbp->nb_last_id);
+#endif
 		return;
 	}
 
@@ -1062,7 +1064,9 @@ mbnambuf_write(struct mbnambuf *nbp, cha
 	count = strlen(name);
 	newlen = nbp->nb_len + count;
 	if (newlen > WIN_MAXLEN || newlen > MAXNAMLEN) {
+#ifdef MSDOSFS_DEBUG
 		printf("msdosfs: file name length %zu too large\n", newlen);
+#endif
 		return;
 	}
 

Modified: stable/9/sys/fs/msdosfs/msdosfs_denode.c
==============================================================================
--- stable/9/sys/fs/msdosfs/msdosfs_denode.c	Sun Jan  1 23:12:56 2012	(r229231)
+++ stable/9/sys/fs/msdosfs/msdosfs_denode.c	Sun Jan  1 23:17:08 2012	(r229232)
@@ -263,8 +263,10 @@ deget(pmp, dirclust, diroffset, depp)
 		 * instead of what is written in directory entry.
 		 */
 		if (diroffset == 0 && ldep->de_StartCluster != dirclust) {
+#ifdef MSDOSFS_DEBUG
 			printf("deget(): \".\" entry at clust %lu != %lu\n",
 			    dirclust, ldep->de_StartCluster);
+#endif
 			ldep->de_StartCluster = dirclust;
 		}
 
@@ -274,8 +276,11 @@ deget(pmp, dirclust, diroffset, depp)
 			if (error == E2BIG) {
 				ldep->de_FileSize = de_cn2off(pmp, size);
 				error = 0;
-			} else
+			} else {
+#ifdef MSDOSFS_DEBUG
 				printf("deget(): pcbmap returned %d\n", error);
+#endif
+			}
 		}
 	} else
 		nvp->v_type = VREG;
@@ -351,8 +356,10 @@ detrunc(dep, length, flags, cred, td)
 	 * directory's life.
 	 */
 	if ((DETOV(dep)->v_vflag & VV_ROOT) && !FAT32(pmp)) {
+#ifdef MSDOSFS_DEBUG
 		printf("detrunc(): can't truncate root directory, clust %ld, offset %ld\n",
 		    dep->de_dirclust, dep->de_diroffset);
+#endif
 		return (EINVAL);
 	}
 

Modified: stable/9/sys/fs/msdosfs/msdosfs_fat.c
==============================================================================
--- stable/9/sys/fs/msdosfs/msdosfs_fat.c	Sun Jan  1 23:12:56 2012	(r229231)
+++ stable/9/sys/fs/msdosfs/msdosfs_fat.c	Sun Jan  1 23:17:08 2012	(r229232)
@@ -503,7 +503,9 @@ fatentry(function, pmp, cn, oldcontents,
 	 * Be sure they asked us to do something.
 	 */
 	if ((function & (FAT_SET | FAT_GET)) == 0) {
+#ifdef MSDOSFS_DEBUG
 		printf("fatentry(): function code doesn't specify get or set\n");
+#endif
 		return (EINVAL);
 	}
 
@@ -512,7 +514,9 @@ fatentry(function, pmp, cn, oldcontents,
 	 * where to put it, give them an error.
 	 */
 	if ((function & FAT_GET) && oldcontents == NULL) {
+#ifdef MSDOSFS_DEBUG
 		printf("fatentry(): get function with no place to put result\n");
+#endif
 		return (EINVAL);
 	}
 #endif
@@ -997,7 +1001,9 @@ extendfile(dep, count, bpp, ncp, flags)
 	 */
 	if (dep->de_StartCluster == MSDOSFSROOT
 	    && (dep->de_Attributes & ATTR_DIRECTORY)) {
+#ifdef MSDOSFS_DEBUG
 		printf("extendfile(): attempt to extend root directory\n");
+#endif
 		return (ENOSPC);
 	}
 

Modified: stable/9/sys/fs/msdosfs/msdosfs_lookup.c
==============================================================================
--- stable/9/sys/fs/msdosfs/msdosfs_lookup.c	Sun Jan  1 23:12:56 2012	(r229231)
+++ stable/9/sys/fs/msdosfs/msdosfs_lookup.c	Sun Jan  1 23:17:08 2012	(r229232)
@@ -902,8 +902,10 @@ doscheckpath(source, target)
 out:;
 	if (bp)
 		brelse(bp);
+#ifdef MSDOSFS_DEBUG
 	if (error == ENOTDIR)
 		printf("doscheckpath(): .. not a directory?\n");
+#endif
 	if (dep != NULL)
 		vput(DETOV(dep));
 	return (error);

Modified: stable/9/sys/fs/msdosfs/msdosfs_vfsops.c
==============================================================================
--- stable/9/sys/fs/msdosfs/msdosfs_vfsops.c	Sun Jan  1 23:12:56 2012	(r229231)
+++ stable/9/sys/fs/msdosfs/msdosfs_vfsops.c	Sun Jan  1 23:17:08 2012	(r229232)
@@ -555,7 +555,9 @@ mountmsdosfs(struct vnode *devvp, struct
 		    || pmp->pm_FATsecs
 		    || getushort(b710->bpbFSVers)) {
 			error = EINVAL;
+#ifdef MSDOSFS_DEBUG
 			printf("mountmsdosfs(): bad FAT32 filesystem\n");
+#endif
 			goto error_exit;
 		}
 		pmp->pm_fatmask = FAT32_MASK;
@@ -633,8 +635,10 @@ mountmsdosfs(struct vnode *devvp, struct
 
 	clusters = (pmp->pm_fatsize / pmp->pm_fatmult) * pmp->pm_fatdiv;
 	if (pmp->pm_maxcluster >= clusters) {
+#ifdef MSDOSFS_DEBUG
 		printf("Warning: number of clusters (%ld) exceeds FAT "
 		    "capacity (%ld)\n", pmp->pm_maxcluster + 1, clusters);
+#endif
 		pmp->pm_maxcluster = clusters - 1;
 	}
 


More information about the svn-src-stable-9 mailing list