makefs: handle mtree contents= in zfs

When a source path is provided use it rather than constructing one.

Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D38027
This commit is contained in:
Brooks Davis 2023-01-12 18:18:24 +00:00
parent a872c37054
commit aac389a347

View File

@ -255,7 +255,13 @@ static void
fs_populate_path(const fsnode *cur, struct fs_populate_arg *arg,
char *path, size_t sz, int *dirfdp)
{
if (cur->root == NULL) {
if (cur->contents != NULL) {
size_t n;
*dirfdp = AT_FDCWD;
n = strlcpy(path, cur->contents, sz);
assert(n < sz);
} else if (cur->root == NULL) {
size_t n;
*dirfdp = SLIST_FIRST(&arg->dirs)->dirfd;