Ensure that the made-up inode number for a Unix domain socket is persistent.

This commit is contained in:
Jeffrey Hsu 2002-12-25 07:59:39 +00:00
parent abe239cfe2
commit 6f782c4636

View File

@ -404,7 +404,7 @@ uipc_sense(struct socket *so, struct stat *sb)
}
sb->st_dev = NOUDEV;
if (unp->unp_ino == 0)
unp->unp_ino = unp_ino++;
unp->unp_ino = (++unp_ino == 0) ? ++unp_ino : unp_ino;
sb->st_ino = unp->unp_ino;
return (0);
}