From a9ee361f27e0439530387765924574e5358c8a5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Sat, 10 Sep 2022 15:44:41 +0200 Subject: New upstream version 1.8.19 --- include/ipmitool/ipmi_user.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include/ipmitool/ipmi_user.h') diff --git a/include/ipmitool/ipmi_user.h b/include/ipmitool/ipmi_user.h index fd727ca..a3cebd9 100644 --- a/include/ipmitool/ipmi_user.h +++ b/include/ipmitool/ipmi_user.h @@ -30,8 +30,7 @@ * EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. */ -#ifndef IPMI_USER_H -#define IPMI_USER_H +#pragma once #if HAVE_CONFIG_H # include @@ -48,6 +47,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; @@ -79,5 +81,3 @@ int _ipmi_set_user_access(struct ipmi_intf *intf, int _ipmi_set_user_password(struct ipmi_intf *intf, uint8_t user_id, uint8_t operation, const char *password, uint8_t is_twenty_byte); - -#endif /* IPMI_USER_H */ -- cgit v1.2.3