From nobody Tue Jan 24 22:11:54 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 4P1h5k34Yjz3bfd0; Tue, 24 Jan 2023 22:11:54 +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 4P1h5k2B0Xz4PlC; Tue, 24 Jan 2023 22:11:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674598314; 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=jnwmLUkYM6FNgMBeu8JJYGxyFxDc1nEOfb3DjBuBtBY=; b=dHiItO0ZHP5ew5gy3XpYHyFJizm+6xMMD7gXktgyF1mJPLmAqORRJsJ//cXn0OdsDBWawF BFad/JwcgHEYJTPylJWpmGY7GyDD85VLW3ZtGNLJO06epIIF0DO2eFT1I+Qjk5P12SgXXj u/CE2QrtuKe3SUm4WQSeMPbQmf4CLBBN4vqqGoxhpeZpGkVibk/AnpyIhJgypSa7zQDe1w 5RKU37JLdt75v7aHNFdM7H/ZuCSXO0xPR5g9OJHAlxh0Nlkgm/bbXztVDnXdtmuHoALzY7 x+NTeMtdO9ZnRM7DmFR1L16Pc1/G7FXX5uolIER/4h7gtX9gzpiJgULgsQW5rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674598314; 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=jnwmLUkYM6FNgMBeu8JJYGxyFxDc1nEOfb3DjBuBtBY=; b=lco0oJekMwJnrXo3wbXN8n/LSnWf02IyNnJZ2Wy+2hJPTNanlmiaDxj1JNR4KfBO2nfK5I ymXCTQS/8jvKVDyFczINM/eUKuMlYVmuUGWyE4VSXsiJLhw+Hu5KnRMq0MOGX1w5wO8BM9 24voVoeTW7L5bmsqhwCj9ZDI2fKvO4K7GGkHPSwtkzcc6R/TSzlb+hWb+X7l9arkJlPfja jHhLDQ4gadMx3U8XtszDFuL7J+2sE364PSoSAiEf1AbnjdOgUx8Ea2ANdaAnXTKsx7ytjq 5ZAYH3B6KL714N1dHZFk07vOvOJjPs5OGIGgtwJiDCMWCdk7HOz9G5fSkqL5JQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674598314; a=rsa-sha256; cv=none; b=JWNS07x/HyZPYGYVEQ43oOzk2RKlhusu4AGhQYmjO2DQDWSJzFxcQfpyaFbWirB/H1/bam 9I9P4fiuLrHjb0l5jx9s6idem7fX2Hrcw7pz0ohReqmQ0lohcCo9fQtfmc7+ERm38MuFFb 25Fv2hkfKZF7xLpih44RRiw+/DOrXDvEeKZeH9O8Y2NDZecqphogAKhTd6sXe24khy5Gd8 x2GEtlegTNFZ3GHYXHx6taXeprMzoABwzgiwyw1wJHpE52Q+m4DFWVHSKj1yfgi+otoFds Qn+Tm0LKg4WYk/2csfai+pviaaY35trQQXKphKVglc1991CzzcunkwZfnD41dw== 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 4P1h5k1Hy0zQdy; Tue, 24 Jan 2023 22:11:54 +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 30OMBstR085351; Tue, 24 Jan 2023 22:11:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30OMBsV7085350; Tue, 24 Jan 2023 22:11:54 GMT (envelope-from git) Date: Tue, 24 Jan 2023 22:11:54 GMT Message-Id: <202301242211.30OMBsV7085350@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 0683209a94b0 - stable/13 - stand: Change zfs_fmtdev to take a struct devdesc * 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: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 0683209a94b09d0ac41ba7ead6fc623fd545b0ff Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=0683209a94b09d0ac41ba7ead6fc623fd545b0ff commit 0683209a94b09d0ac41ba7ead6fc623fd545b0ff Author: Warner Losh AuthorDate: 2022-08-11 15:05:15 +0000 Commit: Warner Losh CommitDate: 2023-01-24 21:49:30 +0000 stand: Change zfs_fmtdev to take a struct devdesc * Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D35974 (cherry picked from commit d2d4e1271b33b233f57fd18a61a1b5c1b0aeb355) --- stand/i386/loader/main.c | 2 +- stand/i386/zfsboot/zfsboot.c | 2 +- stand/libsa/zfs/devicename_stubs.c | 2 +- stand/libsa/zfs/libzfs.h | 2 +- stand/libsa/zfs/zfs.c | 6 +++--- stand/userboot/userboot/main.c | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/stand/i386/loader/main.c b/stand/i386/loader/main.c index 29c40921a85a..4d5a0a98a08e 100644 --- a/stand/i386/loader/main.c +++ b/stand/i386/loader/main.c @@ -387,7 +387,7 @@ extract_currdev(void) #ifdef LOADER_ZFS_SUPPORT if (new_currdev.dd.d_dev->dv_type == DEVT_ZFS) - init_zfs_boot_options(zfs_fmtdev(&new_currdev)); + init_zfs_boot_options(zfs_fmtdev(&new_currdev.dd)); #endif env_setenv("currdev", EV_VOLATILE, i386_fmtdev(&new_currdev), diff --git a/stand/i386/zfsboot/zfsboot.c b/stand/i386/zfsboot/zfsboot.c index b68d80e802c2..52fd41688a17 100644 --- a/stand/i386/zfsboot/zfsboot.c +++ b/stand/i386/zfsboot/zfsboot.c @@ -226,7 +226,7 @@ main(void) */ if (bdev != NULL && bdev->dd.d_dev->dv_type == DEVT_ZFS) { /* set up proper device name string for ZFS */ - strncpy(boot_devname, zfs_fmtdev(bdev), sizeof (boot_devname)); + strncpy(boot_devname, zfs_fmtdev(&bdev->dd), sizeof (boot_devname)); if (zfs_get_bootonce(bdev, OS_BOOTONCE, cmd, sizeof(cmd)) == 0) { nvlist_t *benv; diff --git a/stand/libsa/zfs/devicename_stubs.c b/stand/libsa/zfs/devicename_stubs.c index 41bf907e0cf1..e58bc9c40e35 100644 --- a/stand/libsa/zfs/devicename_stubs.c +++ b/stand/libsa/zfs/devicename_stubs.c @@ -39,7 +39,7 @@ zfs_parsedev(struct zfs_devdesc *dev, const char *devspec, const char **path) __attribute__((weak)) char * -zfs_fmtdev(void *vdev) +zfs_fmtdev(struct devdesc *vdev) { static char buf[128]; diff --git a/stand/libsa/zfs/libzfs.h b/stand/libsa/zfs/libzfs.h index e8676c0d53b8..2f0dfd8afc86 100644 --- a/stand/libsa/zfs/libzfs.h +++ b/stand/libsa/zfs/libzfs.h @@ -50,7 +50,7 @@ struct zfs_devdesc { int zfs_parsedev(struct zfs_devdesc *dev, const char *devspec, const char **path); -char *zfs_fmtdev(void *vdev); +char *zfs_fmtdev(struct devdesc *); int zfs_probe_dev(const char *devname, uint64_t *pool_guid); int zfs_list(const char *name); int zfs_get_bootonce(void *, const char *, char *, size_t); diff --git a/stand/libsa/zfs/zfs.c b/stand/libsa/zfs/zfs.c index 71e3a49c2929..5392bcaa4fb1 100644 --- a/stand/libsa/zfs/zfs.c +++ b/stand/libsa/zfs/zfs.c @@ -1583,7 +1583,7 @@ zfs_dev_open(struct open_file *f, ...) rv = 0; /* This device is not set as currdev, mount us private copy. */ if (mount == NULL) - rv = zfs_mount(zfs_fmtdev(dev), NULL, (void **)&mount); + rv = zfs_mount(zfs_fmtdev(&dev->dd), NULL, (void **)&mount); if (rv == 0) { f->f_devdata = mount; @@ -1681,7 +1681,7 @@ zfs_parsedev(struct zfs_devdesc *dev, const char *devspec, const char **path) } char * -zfs_fmtdev(void *vdev) +zfs_fmtdev(struct devdesc *vdev) { static char rootname[ZFS_MAXNAMELEN]; static char buf[2 * ZFS_MAXNAMELEN + 8]; @@ -1689,7 +1689,7 @@ zfs_fmtdev(void *vdev) spa_t *spa; buf[0] = '\0'; - if (dev->dd.d_dev->dv_type != DEVT_ZFS) + if (vdev->d_dev->dv_type != DEVT_ZFS) return (buf); /* Do we have any pools? */ diff --git a/stand/userboot/userboot/main.c b/stand/userboot/userboot/main.c index 07630945cf80..d3f12ab1675e 100644 --- a/stand/userboot/userboot/main.c +++ b/stand/userboot/userboot/main.c @@ -260,7 +260,7 @@ extract_currdev(void) bzero(&zdev, sizeof(zdev)); zdev.dd.d_dev = &zfs_dev; - init_zfs_boot_options(zfs_fmtdev(&zdev)); + init_zfs_boot_options(zfs_fmtdev(&zdev.dd)); dd = &zdev.dd; } else #endif