Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-15-SP2:Update
nvme-cli
0023-Fixing-Alignment-Error-In-intel-smart-log-...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0023-Fixing-Alignment-Error-In-intel-smart-log-add.patch of Package nvme-cli
From: Ben Reese <5884008+benreese0@users.noreply.github.com> Date: Tue, 3 Mar 2020 13:41:41 -0800 Subject: Fixing Alignment Error In intel smart-log-add References: bsc#1177737 Git-commit: bb958d5e21eb788e2c2a2137f4b16fa15391cb3b Fixing alignment in nvme_additional_smart_log_item introduced by switch from '#pragma pack' semantics to '__attribute__((pack))'. Per https://gcc.gnu.org/onlinedocs/gcc/Common-Type-Attributes.html each union or struct requires it's own '__attribute__((pack))'. Signed-off-by: Ben Reese <5884008+benreese0@users.noreply.github.com> --- plugins/intel/intel-nvme.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) --- a/plugins/intel/intel-nvme.c +++ b/plugins/intel/intel-nvme.c @@ -20,25 +20,25 @@ #define CREATE_CMD #include "intel-nvme.h" -struct nvme_additional_smart_log_item { +struct __attribute__((packed)) nvme_additional_smart_log_item { __u8 key; __u8 _kp[2]; __u8 norm; __u8 _np; - union { + union __attribute__((packed)) { __u8 raw[6]; - struct wear_level { + struct __attribute__((packed)) wear_level { __le16 min; __le16 max; __le16 avg; } wear_level; - struct thermal_throttle { + struct __attribute__((packed)) thermal_throttle { __u8 pct; __u32 count; } thermal_throttle; - }; + } ; __u8 _rp; -} __attribute__((packed)); +} ; struct nvme_additional_smart_log { struct nvme_additional_smart_log_item program_fail_cnt;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor