HomeFreeBSD

MFC r334412: userboot: Fix bad type-punning

Description

MFC r334412: userboot: Fix bad type-punning

Pass a struct devdesc to the format commands. Use proper type rather
than doing weird type-punning that happened to work because the size
was right. We copied a zfs devdesc into a disk_devdesc and then after
passing through a NULL pointer reinterpreted it as a
zfs_devdesc. Instead, pass the base devdesc around and 'upcase' when
we know the types are right.

This has the happy side effect of fixing a gcc warning about bad
type punning.

Details

Provenance
kevansAuthored on
Parents
rS344369: Remove an obsolete comment.
Branches
Unknown
Tags
Unknown