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