Module Name:    src
Committed By:   christos
Date:           Sun Jan 27 22:07:20 UTC 2013

Modified Files:
        src/usr.sbin/makefs/msdos: msdosfs_vnops.c

Log Message:
- some more debugging
- use msdosfs_update() -- should not be needed.
- remove <sys/mount.h>


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/usr.sbin/makefs/msdos/msdosfs_vnops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.sbin/makefs/msdos/msdosfs_vnops.c
diff -u src/usr.sbin/makefs/msdos/msdosfs_vnops.c:1.9 src/usr.sbin/makefs/msdos/msdosfs_vnops.c:1.10
--- src/usr.sbin/makefs/msdos/msdosfs_vnops.c:1.9	Sun Jan 27 15:05:46 2013
+++ src/usr.sbin/makefs/msdos/msdosfs_vnops.c	Sun Jan 27 17:07:19 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: msdosfs_vnops.c,v 1.9 2013/01/27 20:05:46 christos Exp $ */
+/*	$NetBSD: msdosfs_vnops.c,v 1.10 2013/01/27 22:07:19 christos Exp $ */
 
 /*-
  * Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank.
@@ -51,11 +51,10 @@
 #endif
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: msdosfs_vnops.c,v 1.9 2013/01/27 20:05:46 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: msdosfs_vnops.c,v 1.10 2013/01/27 22:07:19 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/mman.h>
-#include <sys/mount.h>
 #include <fcntl.h>
 #include <unistd.h>
 
@@ -554,6 +553,7 @@ msdosfs_mkdire(const char *path, struct 
 	if (error)
 		goto bad2;
 
+	DPRINTF(("%s(newcluster %lu)\n", __func__, newcluster));
 	memset(&ndirent, 0, sizeof(ndirent));
 	ndirent.de_pmp = pmp;
 	ndirent.de_flag = DE_ACCESS | DE_CREATE | DE_UPDATE;
@@ -566,6 +566,8 @@ msdosfs_mkdire(const char *path, struct 
 	 */
 	bn = cntobn(pmp, newcluster);
 	lbn = de_bn2kb(pmp, bn);
+	DPRINTF(("%s(newcluster %lu, bn=%lu, lbn=%lu)\n", __func__, newcluster,
+	    bn, lbn));
 	/* always succeeds */
 	bp = getblk(pmp->pm_devvp, lbn, pmp->pm_bpcluster, 0, 0);
 	memset(bp->b_data, 0, pmp->pm_bpcluster);
@@ -616,6 +618,8 @@ msdosfs_mkdire(const char *path, struct 
 		goto bad;
 	if ((error = createde(&ndirent, pdep, &dep, &cn)) != 0)
 		goto bad;
+	if ((error = msdosfs_updatede(dep)) != 0)
+		goto bad;
 	return dep;
 
 bad:

Reply via email to