diff options
author | marcel <marcel@FreeBSD.org> | 2013-05-13 18:34:33 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2013-05-13 18:34:33 +0000 |
commit | 99aa6ad820a960dd26eeafaa6bff9f2a77da489d (patch) | |
tree | 58814ae451b8adf68093038f770063a39beab987 | |
parent | d1ce45a46f7a9b89b123dcde2d66f0ece46d880a (diff) | |
download | FreeBSD-src-99aa6ad820a960dd26eeafaa6bff9f2a77da489d.zip FreeBSD-src-99aa6ad820a960dd26eeafaa6bff9f2a77da489d.tar.gz |
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.
-rw-r--r-- | usr.sbin/makefs/mtree.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/usr.sbin/makefs/mtree.c b/usr.sbin/makefs/mtree.c index c90c974..d772bc1 100644 --- a/usr.sbin/makefs/mtree.c +++ b/usr.sbin/makefs/mtree.c @@ -1050,6 +1050,7 @@ read_mtree(const char *fname, fsnode *node) 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; |