diff options
| author | Burt P <pburt0@gmail.com> | 2019-06-30 18:14:51 -0500 | 
|---|---|---|
| committer | Leandro A. F. Pereira <leandro@hardinfo.org> | 2019-07-02 17:36:25 -0700 | 
| commit | fa17fdf3cc463c990a1e84150c8766ec49a9c6ce (patch) | |
| tree | b711bd37176156e49e41f27e2538b41d7e0306e0 /includes | |
| parent | d7750592038e79a602c329a42a813fa098e5f6ad (diff) | |
dmi_util/memory devices: fixes for 32-bit systems
Signed-off-by: Burt P <pburt0@gmail.com>
Diffstat (limited to 'includes')
| -rw-r--r-- | includes/dmi_util.h | 15 | 
1 files changed, 10 insertions, 5 deletions
| diff --git a/includes/dmi_util.h b/includes/dmi_util.h index 3b6fd3f4..d557d58b 100644 --- a/includes/dmi_util.h +++ b/includes/dmi_util.h @@ -21,6 +21,11 @@  #ifndef __DMI_UTIL_H__  #define __DMI_UTIL_H__ +#include <inttypes.h> + +typedef uint32_t dmi_handle; +typedef uint32_t dmi_type; +  /* -1 = yes, but will be ignored   *  0 = no   *  1 = yes */ @@ -34,22 +39,22 @@ char *dmi_get_str_abs(const char *id_str); /* include nonsense */  char *dmi_chassis_type_str(int chassis_type, gboolean with_val);  typedef struct { -    unsigned long count; -    unsigned long *handles; +    uint32_t count; +    dmi_handle *handles;  } dmi_handle_list;  /* get a list of handles that match a dmi_type */ -dmi_handle_list *dmidecode_handles(const unsigned long *dmi_type); +dmi_handle_list *dmidecode_handles(const dmi_type *type);  void dmi_handle_list_free(dmi_handle_list *hl);  /* get a list of handles which have a name, and/or optional value, and/or limit to an optional dmi_type   * dmidecode_match_value("Name", NULL, NULL) : all dmi handles with an item called "Name"   * dmidecode_match_value("Name", "Value", NULL) : all dmi_handles with an item called "Name" that has a value of "Value"   * dmidecode_match_value("Name", "Value", &dt) : all dmi_handles with "Name: Value" that are of type stored in dt */ -dmi_handle_list *dmidecode_match_value(const char *name, const char *value, const unsigned long *dmi_type); +dmi_handle_list *dmidecode_match_value(const char *name, const char *value, const dmi_type *type);  /* get the first value for name, limiting to optional dmi_type and/or optional handle */ -char *dmidecode_match(const char *name, const unsigned long *dmi_type, const unsigned long *handle); +char *dmidecode_match(const char *name, const dmi_type *type, const dmi_handle *handle);  void dmidecode_cache_free(); | 
