From nobody Thu Jan 12 18:20:12 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NtCWx1yzjz2pK9K; Thu, 12 Jan 2023 18:20:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NtCWx1F7Bz4Cwb; Thu, 12 Jan 2023 18:20:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673547613; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WFCTQr50Mawn6AqTp/iV6206Vh0zJh5aqH4r1NTGSvw=; b=TWcKpNFoEkZzsl7I/LMCCoKXH6B5k9DpRJnQyJO9xguw9xN0r1xoMX+lOQ2Jal6t2Hc/7j T6DvZDbumcsEf8u49leRnSKY4AVurUxGAhRdo2MBr245pUnBEsV7XtLNN7nAHFBS3cvvjJ xaf6NuoR7MSrU/N6a6+19pxBQBEfRMfJs8Odac7g4S9XfWWefgN+StZcnXAWRPSl/E0Aon LwOYIBkoVrIaAsqYDMKzF/nGCKHmhzJK6jwLOYh6tvF4vZYBwIAHDxcsQb9oqiUNtzKwhz U6CRzcqXVm3SQCCYmugvvo+wU9Vwt6hGq7TTKzfAjoicjrxlgoLvlIlJaaOccQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673547613; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WFCTQr50Mawn6AqTp/iV6206Vh0zJh5aqH4r1NTGSvw=; b=Qw0OQdd1DTiWnAPntdj3iKhXY1fL+qPmk/sUsdTI4lxV/dSr2T5+Sdrn8p3OPGEQVaxUVr tNa65QZlivvEFtcUYVX1SUwv3NQJK/EaxvWRgsjbo1uEN3QasFN1GFLLzzayV+ikR5R3iu jS3PYQW8JS8uG82HE+ZcnuzoqXBsQAJ+hyNF+bc4aVmtGH8JBLZM64T2JxDn5QBNnpm1Mg vYzXx/AyOEXEX/XuBGcwqLY14xobVSytAwC35QynqA5Rbf8bqPYpXgzYkEGhdW3GoqDvXR bxfg3RtLe6ZutBTX0x6odmTlN7+fvkXx2IUB0CAjqDjCpuPdqVVZECgtJv39hg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1673547613; a=rsa-sha256; cv=none; b=oUbHXe0X5pCOTfDQ+OpLY805VFNLqXiqf35U/jcI7qFebIemiHQiOEirC0zH9ZnnUaJlx2 91D8mfIK3DkHBDrdY6av//JV6Lif8BU+NR+s8dbN1l0FgTUYMIzt1a5r8s6r1iK3z2CGkn bGFyd9jPde8JMXNbRXlnCS2TjaBxQbexGHItP2trufYw6ofKNb44ORu6QddO0BHh9mr5lM wLO6wXsO4Tfn8xCM2DlN9kCq0jJuUh6u3K1M++jfWoP29KAhE+4YXI3jIete43m2UzfpXb KCjivyVYfPAgmwzwzgF7xeT1XFM+Ps+ww0znIeTnzxKGZIC62aiokTdSYefaTg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NtCWx0909zd87; Thu, 12 Jan 2023 18:20:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30CIKCSw013328; Thu, 12 Jan 2023 18:20:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30CIKC8R013322; Thu, 12 Jan 2023 18:20:12 GMT (envelope-from git) Date: Thu, 12 Jan 2023 18:20:12 GMT Message-Id: <202301121820.30CIKC8R013322@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: aac389a34773 - main - makefs: handle mtree contents= in zfs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: aac389a347733b5fa2bf4df3dcb2d39b2f739d61 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=aac389a347733b5fa2bf4df3dcb2d39b2f739d61 commit aac389a347733b5fa2bf4df3dcb2d39b2f739d61 Author: Brooks Davis AuthorDate: 2023-01-12 18:18:24 +0000 Commit: Brooks Davis CommitDate: 2023-01-12 18:18:24 +0000 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 --- usr.sbin/makefs/zfs/fs.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/usr.sbin/makefs/zfs/fs.c b/usr.sbin/makefs/zfs/fs.c index ecade55db52c..b9cc860c2e29 100644 --- a/usr.sbin/makefs/zfs/fs.c +++ b/usr.sbin/makefs/zfs/fs.c @@ -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;