Changeset View
Changeset View
Standalone View
Standalone View
usr.sbin/makefs/mtree.c
Show First 20 Lines • Show All 777 Lines • ▼ Show 20 Lines | if (sb.st_nlink > 1) { | ||||
st->st_ino = sb.st_ino; | st->st_ino = sb.st_ino; | ||||
st->st_dev = sb.st_dev; | st->st_dev = sb.st_dev; | ||||
curino = link_check(node->inode); | curino = link_check(node->inode); | ||||
if (curino != NULL) { | if (curino != NULL) { | ||||
free(node->inode); | free(node->inode); | ||||
node->inode = curino; | node->inode = curino; | ||||
node->inode->nlink++; | node->inode->nlink++; | ||||
/* Reset st since node->inode has been updated. */ | |||||
st = &node->inode->st; | |||||
emaste: I think I like this one slightly better | |||||
} | } | ||||
} | } | ||||
free(node->contents); | free(node->contents); | ||||
node->contents = name; | node->contents = name; | ||||
st->st_size = sb.st_size; | st->st_size = sb.st_size; | ||||
return (0); | return (0); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 322 Lines • Show Last 20 Lines |
I think I like this one slightly better