mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 04:43:53 +00:00
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
This commit is contained in:
parent
dc472f6702
commit
ad759c7352
|
@ -75,6 +75,7 @@ struct devsw md_dev = {
|
|||
.dv_ioctl = noioctl,
|
||||
.dv_print = md_print,
|
||||
.dv_cleanup = nullsys,
|
||||
.dv_fmtdev = disk_fmtdev,
|
||||
};
|
||||
|
||||
static int
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 *
|
||||
|
|
|
@ -30,6 +30,7 @@ __FBSDID("$FreeBSD$");
|
|||
#include <stdarg.h>
|
||||
#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
|
||||
|
|
|
@ -39,7 +39,7 @@ __FBSDID("$FreeBSD$");
|
|||
#include <stand.h>
|
||||
#include <sys/disk.h>
|
||||
|
||||
#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,
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -72,6 +72,7 @@ struct devsw userboot_disk = {
|
|||
.dv_ioctl = userdisk_ioctl,
|
||||
.dv_print = userdisk_print,
|
||||
.dv_cleanup = userdisk_cleanup,
|
||||
.dv_fmtdev = disk_fmtdev,
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue