mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-10 10:37:22 +00:00
ID:397 - Fixed picmg policy set command.
'picmg policy set' command uses too restrictive input values check which allow setting/clearing only the Activation Locked Bit (#0). This patch fixes the check to allow setting/clearing Deactivation Locked Bit (#1) as well.
This commit is contained in:
parent
603c14274a
commit
c9e3e6a01b
@ -751,21 +751,19 @@ ipmi_picmg_fru_activation_policy_set(struct ipmi_intf * intf, int argc, char **
|
|||||||
if (is_fru_id(argv[0], &msg_data[1]) != 0) {
|
if (is_fru_id(argv[0], &msg_data[1]) != 0) {
|
||||||
return (-1);
|
return (-1);
|
||||||
}
|
}
|
||||||
if (str2uchar(argv[1], &msg_data[2]) != 0 || msg_data[2] > 1) {
|
if (str2uchar(argv[1], &msg_data[2]) != 0 || msg_data[2] > 3) {
|
||||||
/* FRU Lock Mask */
|
/* FRU Lock Mask */
|
||||||
lprintf(LOG_ERR, "Given FRU Lock Mask '%s' is invalid.",
|
lprintf(LOG_ERR, "Given FRU Lock Mask '%s' is invalid.",
|
||||||
argv[1]);
|
argv[1]);
|
||||||
return (-1);
|
return (-1);
|
||||||
}
|
}
|
||||||
if (str2uchar(argv[2], &msg_data[3]) != 0 || msg_data[3] > 1) {
|
if (str2uchar(argv[2], &msg_data[3]) != 0 || msg_data[3] > 3) {
|
||||||
/* FRU Act Policy */
|
/* FRU Act Policy */
|
||||||
lprintf(LOG_ERR,
|
lprintf(LOG_ERR,
|
||||||
"Given FRU Activation Policy '%s' is invalid.",
|
"Given FRU Activation Policy '%s' is invalid.",
|
||||||
argv[2]);
|
argv[2]);
|
||||||
return (-1);
|
return (-1);
|
||||||
}
|
}
|
||||||
msg_data[2]&= 0x03;
|
|
||||||
msg_data[3]&= 0x03;
|
|
||||||
|
|
||||||
rsp = intf->sendrecv(intf, &req);
|
rsp = intf->sendrecv(intf, &req);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user