mirror of
https://github.com/ipmitool/ipmitool.git
synced 2026-06-03 20:51:36 +00:00
Replace user_id masks with a macro (#8)
In multiple places throughout ipmi_user.c a user id mask was used as a magic number, in some places the mask was wrong. This commit replaces all those magic numbers with a single IPMI_UID() macro. Resolves ipmitool/ipmitool#6
This commit is contained in:
committed by
GitHub
parent
564aef2aff
commit
432f06db3f
@@ -48,6 +48,9 @@
|
||||
#define IPMI_USER_ENABLE_DISABLED 0x80
|
||||
#define IPMI_USER_ENABLE_RESERVED 0xC0
|
||||
|
||||
#define IPMI_UID_MASK 0x3F /* The user_id is 6-bit and is usually in bits [5:0] */
|
||||
#define IPMI_UID(id) ((id) & IPMI_UID_MASK)
|
||||
|
||||
/* (22.27) Get and (22.26) Set User Access */
|
||||
struct user_access_t {
|
||||
uint8_t callin_callback;
|
||||
|
||||
Reference in New Issue
Block a user