]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Pass a struct devdesc to the format commands. Use proper type rather
authorimp <imp@FreeBSD.org>
Thu, 31 May 2018 02:54:11 +0000 (02:54 +0000)
committerimp <imp@FreeBSD.org>
Thu, 31 May 2018 02:54:11 +0000 (02:54 +0000)
commit356f4f83c1caa23721bc7180e0d47be749011e0f
treea7ab0834ca7d18b01d064bcef58420d70ba23595
parenta95a194429e14d27f3b571a65d07911b0e60474c
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.

Differential Revision: https://reviews.freebsd.org/D15629
stand/userboot/userboot/devicename.c
stand/userboot/userboot/main.c