diff options
author | Ivan Mikhaylov <fr0st61te@gmail.com> | 2020-01-23 18:06:47 +0300 |
---|---|---|
committer | Alexander Amelkin <alexander@amelkin.msk.ru> | 2020-01-23 18:06:47 +0300 |
commit | 7a66d8725dbe40dfd45b3de0066d8363cc82b184 (patch) | |
tree | 76d9e185eba8826db40ac15f8224ece5c13697c8 | |
parent | 63dd71c39c9bf522ad3a785dd001737a285458eb (diff) | |
download | ipmitool-7a66d8725dbe40dfd45b3de0066d8363cc82b184.tar.gz |
chassis: bootmbox: Refix 62a04390
Fix ipmitool not writing the last block of boot mailbox data if the
block is shorter than 3 bytes.
Signed-off-by: Ivan Mikhaylov <fr0st61te@gmail.com>
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
-rw-r--r-- | lib/ipmi_chassis.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/ipmi_chassis.c b/lib/ipmi_chassis.c index 4056f83..f75f7d8 100644 --- a/lib/ipmi_chassis.c +++ b/lib/ipmi_chassis.c @@ -1408,7 +1408,8 @@ chassis_set_bootmailbox(struct ipmi_intf *intf, int16_t block, bool use_text, * We need to write all data, so calculate the data * size in blocks and set the starting block to zero. */ - blocks = datasize; + blocks = CHASSIS_BOOT_MBOX_IANA_SZ; + blocks += datasize; blocks += CHASSIS_BOOT_MBOX_BLOCK_SZ - 1; blocks /= CHASSIS_BOOT_MBOX_BLOCK_SZ; |