From 7b4214534ccdf6f8aa6e566d7501aab328c72e84 Mon Sep 17 00:00:00 2001 From: Robert Mustacchi Date: Mon, 23 Nov 2020 14:09:18 -0800 Subject: 13324 struct dk_minfo_ext size differences trigger SSP in libfdisk Reviewed by: Jason King Reviewed by: Andy Fiddaman Reviewed by: Toomas Soome Approved by: Joshua Clulow --- usr/src/uts/common/sys/dkio.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'usr/src/uts/common/sys') diff --git a/usr/src/uts/common/sys/dkio.h b/usr/src/uts/common/sys/dkio.h index 9d88731c5d..e66551fc6d 100644 --- a/usr/src/uts/common/sys/dkio.h +++ b/usr/src/uts/common/sys/dkio.h @@ -356,6 +356,23 @@ struct dk_minfo_ext { uint_t dki_pbsize; /* Physical blocksize of media */ }; +#ifdef _KERNEL + +/* + * The 32-bit version of the media info API did not end up with a consistent + * size in an ILP32 and LP64 interface. While the actual offsets of the members + * are the same, the resulting structure size is not. + */ +#pragma pack(4) +struct dk_minfo_ext32 { + uint_t dki_media_type; /* Media type or profile info */ + uint_t dki_lbsize; /* Logical blocksize of media */ + diskaddr_t dki_capacity; /* Capacity as # of dki_lbsize blks */ + uint_t dki_pbsize; /* Physical blocksize of media */ +}; +#pragma pack() +#endif + /* * Media types or profiles known */ -- cgit v1.2.3