Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 May 2013 18:34:33 +0000 (UTC)
From:      Marcel Moolenaar <marcel@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r250605 - head/usr.sbin/makefs
Message-ID:  <201305131834.r4DIYXH7035166@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201305131834.r4DIYXH7035166>