#include "env-util.h"
#include "fd-util.h"
#include "fs-util.h"
+#include "hexdecoct.h"
#include "log.h"
#include "mountpoint-util.h"
#include "namespace-util.h"
return enter_cgroup(ret_cgroup, false);
}
+int define_hex_ptr_internal(const char *hex, void **name, size_t *name_len) {
+ return unhexmem_full(hex, strlen_ptr(hex), false, name, name_len);
+}
+
const char* ci_environment(void) {
/* We return a string because we might want to provide multiple bits of information later on: not
* just the general CI environment type, but also whether we're sanitizing or not, etc. The caller is
#define CAN_MEMLOCK_SIZE (512 * 1024U)
bool can_memlock(void);
+int define_hex_ptr_internal(const char *hex, void **name, size_t *name_len);
+
/* Define void* buffer and size_t length variables from a hex string. */
#define DEFINE_HEX_PTR(name, hex) \
_cleanup_free_ void *name = NULL; \
size_t name##_len = 0; \
- assert_se(unhexmem_full(hex, strlen_ptr(hex), false, &name, &name##_len) >= 0);
+ assert_se(define_hex_ptr_internal(hex, &name, &name##_len) >= 0)
/* Provide a convenient way to check if we're running in CI. */
const char* ci_environment(void);