summaryrefslogtreecommitdiffstats
path: root/src/libsystemd/sd-id128/id128-util.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsystemd/sd-id128/id128-util.h')
-rw-r--r--src/libsystemd/sd-id128/id128-util.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/libsystemd/sd-id128/id128-util.h b/src/libsystemd/sd-id128/id128-util.h
index 7bcbd8e558..bd3e201361 100644
--- a/src/libsystemd/sd-id128/id128-util.h
+++ b/src/libsystemd/sd-id128/id128-util.h
@@ -6,6 +6,7 @@
#include "sd-id128.h"
+#include "errno-util.h"
#include "hash-funcs.h"
#include "macro.h"
@@ -45,8 +46,9 @@ sd_id128_t id128_make_v4_uuid(sd_id128_t id);
int id128_get_product(sd_id128_t *ret);
/* A helper to check for the three relevant cases of "machine ID not initialized" */
-#define ERRNO_IS_MACHINE_ID_UNSET(r) \
- IN_SET(abs(r), \
- ENOENT, \
- ENOMEDIUM, \
- ENOPKG)
+#define ERRNO_IS_NEG_MACHINE_ID_UNSET(r) \
+ IN_SET(r, \
+ -ENOENT, \
+ -ENOMEDIUM, \
+ -ENOPKG)
+_DEFINE_ABS_WRAPPER(MACHINE_ID_UNSET);