From nobody Tue Jan 24 22:11:57 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 4P1h5p1fPRz3bfr7; Tue, 24 Jan 2023 22:11:58 +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 4P1h5n5THRz4QCd; Tue, 24 Jan 2023 22:11:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674598317; 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=w+NY6YyJ74c49csGuxRc2hTE1qSJCXFPc1QFBDv9Xeg=; b=H8bd+9c0x7/eFFd4/xh3O9GRL6EMcOai49RUlsKJDoxSKsMkeyuxI0r6UhWeWPfwe/l1CJ 8ZRzUtiTSn13enDKXyhBVkYP4OD8C0dJo/wZFcEepXwSQ6Ev5smFTOrMOzyoaFavK8kRka boFZV4DCqGvSNQHqcYYCS5R901UibEvRABxDKxrh4hmxwTy7dKVErrD+FHpc0sQI5M0zA3 ZikoW3dIIBiI2+MajtrxNcW/52P9ocNwy9QTOtRU6TiirUmr4G/ykZunlbLuNomcNbQz0f qL4v9bRaxHGZPAhzH84FMoejivn5Y2Z5G0If6xuLLjf8GG+ykBqTsU2DQ1hFhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674598317; 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=w+NY6YyJ74c49csGuxRc2hTE1qSJCXFPc1QFBDv9Xeg=; b=g/8vfUrK8ZJGp+SpkTKytCqCL8saXhNPIAuHDARyotPRFGA4shYE9YkavIBnW9voGEmRxu 0P524KwFf5axvZXO9nJaTzRFSuC5gmOqJP8VrQTPsRkY0DZLikaS83t2jjrlzX+4lnR5qL rkkT0+J5nFU1cV1g76qgY56eZDZE0Ejx4gkRsr9RsP6CahCmG4S5QcmMH+2Sq3auY8LUow YtGzzrNr57+qvuMiDtoWjp0MB+FE42jilcMkLU5+Gb5QV5+cd7KfhBHGGZyDdk+fvSeU7S A3oBmRT4eH7v1UZ59sLOOknTc2Mk66qwShxB4oQZPwOxTEf3daPWqxuDz5J5lw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674598317; a=rsa-sha256; cv=none; b=Fc/AynlWINGIR14NiH4/DYVRRV0lOEWS+YMuo5HecI2LIGlF9tY0QvFXV4A54Naa/XUfc2 nlkaA/xQyBAsEHJkBYlcWOgyLW9WTB//Ej0IROAo/MaBePzgyhOj9U5KPzt+NVLanHbkPZ 1LYnj55BRLWZjtbqNsHUPn1KNmm5s79UHKoiedUJ30lKPPPPd1n4erhW4GE5gvrUyJloEu xdrPttrlAFNi9KueKVSWo8sLv88GsdBix2RhjkVoG7UFOSQXHTCotEkruI19QQf/j9RTYw OAZpTV3nBqeDsKeGZx+QmPUjHRCnfImBZe/0wuc/O9Tyk+L00c2d/XNgktnlPg== 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 4P1h5n4QWZzQf2; Tue, 24 Jan 2023 22:11:57 +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 30OMBvb8085427; Tue, 24 Jan 2023 22:11:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30OMBvkr085426; Tue, 24 Jan 2023 22:11:57 GMT (envelope-from git) Date: Tue, 24 Jan 2023 22:11:57 GMT Message-Id: <202301242211.30OMBvkr085426@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: de252384c043 - stable/13 - stand: Add disk_fmtdev for dv_fmtdev for all the disk devices 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: de252384c043c204edf7d1ea7439c9f32906662b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=de252384c043c204edf7d1ea7439c9f32906662b commit de252384c043c204edf7d1ea7439c9f32906662b Author: Warner Losh AuthorDate: 2022-08-11 15:06:28 +0000 Commit: Warner Losh CommitDate: 2023-01-24 21:49:30 +0000 stand: Add disk_fmtdev for dv_fmtdev for all the disk devices All of the archsw fmtdev functions treat DEVT_DISK as a call to disk_fmtdev. Set all disks' dv_fmtdev to disk_fmtdev so devformat will return the same thing. Sponsored by: Netflix Reviewed by: tsoome (prior version) Differential Revision: https://reviews.freebsd.org/D35917 (cherry picked from commit ad759c73522efb606135e2891ac03864926b80a3) --- stand/common/md.c | 1 + stand/common/vdisk.c | 1 + stand/efi/libefi/efipart.c | 1 + stand/i386/libi386/biosdisk.c | 1 + stand/kboot/hostdisk.c | 2 ++ stand/libofw/ofw_disk.c | 3 ++- stand/libsa/geli/gelidev.c | 3 ++- stand/uboot/uboot_disk.c | 1 + stand/usb/storage/umass_loader.c | 1 + stand/userboot/userboot/userboot_disk.c | 1 + 10 files changed, 13 insertions(+), 2 deletions(-) diff --git a/stand/common/md.c b/stand/common/md.c index 61db56ece7ae..9f95d3cdfd2d 100644 --- a/stand/common/md.c +++ b/stand/common/md.c @@ -75,6 +75,7 @@ struct devsw md_dev = { .dv_ioctl = noioctl, .dv_print = md_print, .dv_cleanup = nullsys, + .dv_fmtdev = disk_fmtdev, }; static int diff --git a/stand/common/vdisk.c b/stand/common/vdisk.c index c904613a8e91..c4220787b1ac 100644 --- a/stand/common/vdisk.c +++ b/stand/common/vdisk.c @@ -53,6 +53,7 @@ struct devsw vdisk_dev = { .dv_ioctl = vdisk_ioctl, .dv_print = vdisk_print, .dv_cleanup = nullsys, + .dv_fmtdev = disk_fmtdev, }; typedef STAILQ_HEAD(vdisk_info_list, vdisk_info) vdisk_info_list_t; diff --git a/stand/efi/libefi/efipart.c b/stand/efi/libefi/efipart.c index e5c9c88234b7..88587192a1b7 100644 --- a/stand/efi/libefi/efipart.c +++ b/stand/efi/libefi/efipart.c @@ -103,6 +103,7 @@ struct devsw efipart_hddev = { .dv_ioctl = efipart_ioctl, .dv_print = efipart_printhd, .dv_cleanup = nullsys, + .dv_fmtdev = disk_fmtdev, }; static pdinfo_list_t fdinfo = STAILQ_HEAD_INITIALIZER(fdinfo); diff --git a/stand/i386/libi386/biosdisk.c b/stand/i386/libi386/biosdisk.c index 353b25ff6816..1b6134ab2e6b 100644 --- a/stand/i386/libi386/biosdisk.c +++ b/stand/i386/libi386/biosdisk.c @@ -190,6 +190,7 @@ struct devsw bioshd = { .dv_ioctl = bd_ioctl, .dv_print = bd_print, .dv_cleanup = nullsys, + .dv_fmtdev = disk_fmtdev, }; static bdinfo_list_t * diff --git a/stand/kboot/hostdisk.c b/stand/kboot/hostdisk.c index cd125350ce9b..00f133274f10 100644 --- a/stand/kboot/hostdisk.c +++ b/stand/kboot/hostdisk.c @@ -30,6 +30,7 @@ __FBSDID("$FreeBSD$"); #include #include "bootstrap.h" #include "host_syscall.h" +#include "disk.h" static int hostdisk_init(void); static int hostdisk_strategy(void *devdata, int flag, daddr_t dblk, @@ -49,6 +50,7 @@ struct devsw hostdisk = { .dv_ioctl = hostdisk_ioctl, .dv_print = hostdisk_print, .dv_cleanup = nullsys, + .dv_fmtdev = disk_fmtdev, }; static int diff --git a/stand/libofw/ofw_disk.c b/stand/libofw/ofw_disk.c index 086b16a9ecdc..5585b463c737 100644 --- a/stand/libofw/ofw_disk.c +++ b/stand/libofw/ofw_disk.c @@ -39,7 +39,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include "bootstrap.h" +#include "disk.h" #include "libofw.h" static int ofwd_init(void); @@ -60,6 +60,7 @@ struct devsw ofwdisk = { .dv_ioctl = ofwd_ioctl, .dv_print = ofwd_print, .dv_cleanup = nullsys, + .dv_fmtdev = disk_fmtdev, }; /* diff --git a/stand/libsa/geli/gelidev.c b/stand/libsa/geli/gelidev.c index 5dd122a4a681..5f1143399fb3 100644 --- a/stand/libsa/geli/gelidev.c +++ b/stand/libsa/geli/gelidev.c @@ -62,6 +62,7 @@ static struct devsw geli_devsw = { .dv_ioctl = geli_dev_ioctl, .dv_print = geli_dev_print, .dv_cleanup = geli_dev_cleanup, + .dv_fmtdev = disk_fmtdev, }; /* @@ -305,7 +306,7 @@ geli_probe_and_attach(struct open_file *f) hlastblk = (hmediasize / DEV_BSIZE) - 1; /* Taste the host provider. If it's not geli-encrypted just return. */ - gdev = geli_taste(diskdev_read, hdesc, hlastblk, disk_fmtdev(&hdesc->dd)); + gdev = geli_taste(diskdev_read, hdesc, hlastblk, devformat(&hdesc->dd)); if (gdev == NULL) return; diff --git a/stand/uboot/uboot_disk.c b/stand/uboot/uboot_disk.c index 236a118b915a..2a41d1181992 100644 --- a/stand/uboot/uboot_disk.c +++ b/stand/uboot/uboot_disk.c @@ -90,6 +90,7 @@ struct devsw uboot_storage = { .dv_ioctl = stor_ioctl, .dv_print = stor_print, .dv_cleanup = stor_cleanup, + .dv_fmtdev = disk_fmtdev, }; static int diff --git a/stand/usb/storage/umass_loader.c b/stand/usb/storage/umass_loader.c index 1c12f05c2769..cc1f6b68e275 100644 --- a/stand/usb/storage/umass_loader.c +++ b/stand/usb/storage/umass_loader.c @@ -61,6 +61,7 @@ struct devsw umass_disk = { .dv_ioctl = umass_disk_ioctl, .dv_print = umass_disk_print, .dv_cleanup = umass_disk_cleanup, + .dv_fmtdev = disk_fmtdev, }; static int diff --git a/stand/userboot/userboot/userboot_disk.c b/stand/userboot/userboot/userboot_disk.c index ed8a6dbdbbfb..d5b0f36e5e50 100644 --- a/stand/userboot/userboot/userboot_disk.c +++ b/stand/userboot/userboot/userboot_disk.c @@ -72,6 +72,7 @@ struct devsw userboot_disk = { .dv_ioctl = userdisk_ioctl, .dv_print = userdisk_print, .dv_cleanup = userdisk_cleanup, + .dv_fmtdev = disk_fmtdev, }; /*