diff --git a/stand/uboot/common/main.c b/stand/uboot/common/main.c index 50a12cd425fb..b1534b00d268 100644 --- a/stand/uboot/common/main.c +++ b/stand/uboot/common/main.c @@ -310,13 +310,13 @@ print_disk_probe_info() char slice[32]; char partition[32]; - if (currdev.d_disk.slice > 0) - sprintf(slice, "%d", currdev.d_disk.slice); + if (currdev.d_disk.d_slice > 0) + sprintf(slice, "%d", currdev.d_disk.d_slice); else strcpy(slice, ""); - if (currdev.d_disk.partition >= 0) - sprintf(partition, "%d", currdev.d_disk.partition); + if (currdev.d_disk.d_partition >= 0) + sprintf(partition, "%d", currdev.d_disk.d_partition); else strcpy(partition, ""); @@ -332,8 +332,8 @@ probe_disks(int devidx, int load_type, int load_unit, int load_slice, int open_result, unit; struct open_file f; - currdev.d_disk.slice = load_slice; - currdev.d_disk.partition = load_partition; + currdev.d_disk.d_slice = load_slice; + currdev.d_disk.d_partition = load_partition; f.f_devdata = &currdev; open_result = -1; diff --git a/stand/uboot/lib/libuboot.h b/stand/uboot/lib/libuboot.h index 8b81486b1fae..59438e711a65 100644 --- a/stand/uboot/lib/libuboot.h +++ b/stand/uboot/lib/libuboot.h @@ -27,18 +27,14 @@ * $FreeBSD$ */ -struct uboot_devdesc { - struct devdesc dd; /* Must be first. */ - union { - struct { - int slice; - int partition; - off_t offset; - } disk; - } d_kind; -}; +#include -#define d_disk d_kind.disk +struct uboot_devdesc { + union { + struct devdesc dd; + struct disk_devdesc d_disk; + }; +}; /* * Default network packet alignment in memory. On arm arches packets must be