mirror of
https://github.com/anrieff/libcpuid
synced 2024-12-16 16:35:45 +00:00
Add get_error function for internal use
Sometimes, the _libcpuid_errno value needs to be returned
This commit is contained in:
parent
10b4e46179
commit
73c33ced4a
2 changed files with 10 additions and 0 deletions
|
@ -53,6 +53,11 @@ int set_error(cpu_error_t err)
|
|||
return (int) err;
|
||||
}
|
||||
|
||||
int get_error()
|
||||
{
|
||||
return _libcpuid_errno;
|
||||
}
|
||||
|
||||
static void raw_data_t_constructor(struct cpu_raw_data_t* raw)
|
||||
{
|
||||
memset(raw, 0, sizeof(struct cpu_raw_data_t));
|
||||
|
|
|
@ -94,6 +94,11 @@ void debug_print_lbits(int debuglevel, uint64_t mask);
|
|||
*/
|
||||
int set_error(cpu_error_t err);
|
||||
|
||||
/*
|
||||
* Gets the current errno
|
||||
*/
|
||||
int get_error(void);
|
||||
|
||||
extern libcpuid_warn_fn_t _warn_fun;
|
||||
extern int _current_verboselevel;
|
||||
|
||||
|
|
Loading…
Reference in a new issue