svn commit: r330807 - in head/stand/efi: libefi loader
Warner Losh
imp at FreeBSD.org
Mon Mar 12 21:39:39 UTC 2018
Author: imp
Date: Mon Mar 12 21:39:38 2018
New Revision: 330807
URL: https://svnweb.freebsd.org/changeset/base/330807
Log:
We can't use d_opendata for blkio storage.
open_disk uses d_opendata for it's own purpse. We can't store blkio
there. Fortunately, blkio is stored elsewhere and we never actually
retrieve blkio from d_opendata. Eliminate it as a source of confusion.
Eliminate all stores of d_opendata in efi since this layer doesn't own
that field.
Modified:
head/stand/efi/libefi/efipart.c
head/stand/efi/loader/main.c
Modified: head/stand/efi/libefi/efipart.c
==============================================================================
--- head/stand/efi/libefi/efipart.c Mon Mar 12 21:39:27 2018 (r330806)
+++ head/stand/efi/libefi/efipart.c Mon Mar 12 21:39:38 2018 (r330807)
@@ -748,7 +748,6 @@ efipart_print_common(struct devsw *dev, pdinfo_list_t
pd_dev.d_unit = pd->pd_unit;
pd_dev.d_slice = -1;
pd_dev.d_partition = -1;
- pd_dev.d_opendata = blkio;
ret = disk_open(&pd_dev, blkio->Media->BlockSize *
(blkio->Media->LastBlock + 1),
blkio->Media->BlockSize);
Modified: head/stand/efi/loader/main.c
==============================================================================
--- head/stand/efi/loader/main.c Mon Mar 12 21:39:27 2018 (r330806)
+++ head/stand/efi/loader/main.c Mon Mar 12 21:39:38 2018 (r330807)
@@ -177,7 +177,6 @@ set_devdesc_currdev(struct devsw *dev, int unit)
currdev.d_dev = dev;
currdev.d_type = currdev.d_dev->dv_type;
currdev.d_unit = unit;
- currdev.d_opendata = NULL;
devname = efi_fmtdev(&currdev);
env_setenv("currdev", EV_VOLATILE, devname, efi_setcurrdev,
@@ -205,7 +204,6 @@ find_currdev(EFI_LOADED_IMAGE *img)
currdev.d_dev = &zfs_dev;
currdev.d_unit = 0;
currdev.d_type = currdev.d_dev->dv_type;
- currdev.d_opendata = NULL;
currdev.pool_guid = pool_guid;
currdev.root_guid = 0;
devname = efi_fmtdev(&currdev);
@@ -227,7 +225,6 @@ find_currdev(EFI_LOADED_IMAGE *img)
currdev.d_dev = &efipart_hddev;
currdev.d_type = currdev.d_dev->dv_type;
currdev.d_unit = dp->pd_unit;
- currdev.d_opendata = NULL;
currdev.d_slice = -1;
currdev.d_partition = -1;
More information about the svn-src-all
mailing list