Module Name: src
Committed By: christos
Date: Sun Jan 27 22:52:38 UTC 2013
Modified Files:
src/usr.sbin/makefs/msdos: msdosfs_denode.c
Log Message:
fix root detection (although the code is a noop)
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/makefs/msdos/msdosfs_denode.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_denode.c
diff -u src/usr.sbin/makefs/msdos/msdosfs_denode.c:1.2 src/usr.sbin/makefs/msdos/msdosfs_denode.c:1.3
--- src/usr.sbin/makefs/msdos/msdosfs_denode.c:1.2 Sat Jan 26 11:50:46 2013
+++ src/usr.sbin/makefs/msdos/msdosfs_denode.c Sun Jan 27 17:52:38 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: msdosfs_denode.c,v 1.2 2013/01/26 16:50:46 christos Exp $ */
+/* $NetBSD: msdosfs_denode.c,v 1.3 2013/01/27 22:52:38 christos Exp $ */
/*-
* Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank.
@@ -52,7 +52,7 @@
#endif
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: msdosfs_denode.c,v 1.2 2013/01/26 16:50:46 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: msdosfs_denode.c,v 1.3 2013/01/27 22:52:38 christos Exp $");
#include <sys/param.h>
@@ -215,7 +215,7 @@ detrunc(struct denode *dep, u_long lengt
* recognize the root directory at this point in a file or
* directory's life.
*/
- if ((DETOV(dep) == (struct vnode *)-1) && !FAT32(pmp)) {
+ if (dep->de_vnode != NULL && !FAT32(pmp)) {
printf("detrunc(): can't truncate root directory, clust %ld, offset %ld\n",
dep->de_dirclust, dep->de_diroffset);
return (EINVAL);
@@ -323,7 +323,7 @@ deextend(struct denode *dep, u_long leng
/*
* The root of a DOS filesystem cannot be extended.
*/
- if ((DETOV(dep) == (struct vnode *)-1) && !FAT32(pmp))
+ if (dep->de_vnode != NULL && !FAT32(pmp))
return EINVAL;
/*