svn commit: r250605 - head/usr.sbin/makefs

Marcel Moolenaar marcel at FreeBSD.org
Mon May 13 18:34:33 UTC 2013


Author: marcel
Date: Mon May 13 18:34:33 2013
New Revision: 250605
URL: http://svnweb.freebsd.org/changeset/base/250605

Log:
  Set st_nlink in the stat structure within the inode to 1 as well.
  The cd9660 file system uses that field for the link count and it
  was 0. This impacts pwd_mkdb(8) as it checks for st_nlink not being
  0 as part of closing a race.

Modified:
  head/usr.sbin/makefs/mtree.c

Modified: head/usr.sbin/makefs/mtree.c
==============================================================================
--- head/usr.sbin/makefs/mtree.c	Mon May 13 18:13:50 2013	(r250604)
+++ head/usr.sbin/makefs/mtree.c	Mon May 13 18:34:33 2013	(r250605)
@@ -1050,6 +1050,7 @@ read_mtree(const char *fname, fsnode *no
 	bzero(&mtree_global_inode, sizeof(mtree_global_inode));
 	mtree_global.inode = &mtree_global_inode;
 	mtree_global_inode.nlink = 1;
+	mtree_global_inode.st.st_nlink = 1;
 	mtree_global_inode.st.st_atime = mtree_global_inode.st.st_ctime =
 	    mtree_global_inode.st.st_mtime = time(NULL);
 	errors = warnings = 0;


More information about the svn-src-all mailing list