storagehandler: Fix deleteSELEntry() with 0x0000 and 0xFFFF ID

Fixed DeleteSelEntry command return unspecific error when
record ID is 0x0000 or 0xFFFF.

In IPMI spec 2.0 DeleteSelEntry command, the record ID 0x0000
and 0xFFFF means delete the first and last sel. But the code
does not delete the sel entry in this case.

Tested:
1. Get current Sel list.
    eg: ipmitool sel list, the response as below:
    1 | 02/24/2022 | 07:38:42 | Voltage #0x1c | Lower Critical going low  | Asserted
    2 | 02/24/2022 | 07:38:42 | System Boot Initiated #0xa6 | Initiated by power up | Asserted
    3 | 02/24/2022 | 07:38:42 | Voltage #0x1c | Lower Non-critical going low  | Asserted
    4 | 02/24/2022 | 07:38:43 | Voltage #0x1c | Lower Critical going low  | Asserted

2. Use DeleteSelEntry command, record ID is 0x0000, means remove the first entry.
    eg: ipmitool sel delete 0x0000, the response as below:
    Deleted entry 0

3. Check current sel list.
    eg: ipmitool sel list, the first sel entry has been deleted.
    2 | 02/24/2022 | 07:38:42 | System Boot Initiated #0xa6 | Initiated by power up | Asserted
    3 | 02/24/2022 | 07:38:42 | Voltage #0x1c | Lower Non-critical going low  | Asserted
    4 | 02/24/2022 | 07:38:43 | Voltage #0x1c | Lower Critical going low  | Asserted

4. Use DeleteSelEntry command, record ID is 0xFFFF, means remove the last entry.
    eg: ipmitool sel delete 0xFFFF, the response as below:
    Deleted entry 65535

5. Check current sel list.
    eg: ipmitool sel list, the last sel entry has been deleted.
    2 | 02/24/2022 | 07:38:42 | System Boot Initiated #0xa6 | Initiated by power up | Asserted
    3 | 02/24/2022 | 07:38:42 | Voltage #0x1c | Lower Non-critical going low  | Asserted

Change-Id: Iff13429e276c035c1d5ebc2f75a4c7ca9209d6d8
Signed-off-by: Jian Zhang <zhangjian.3032@bytedance.com>
1 file changed