shared: Clean up includes

Split out of #37344.
This commit is contained in:
Daan De Meyer
2025-05-24 14:00:44 +02:00
parent 9d75fb9647
commit 69a283c5f2
394 changed files with 1181 additions and 1903 deletions
+11
View File
@@ -1,10 +1,16 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include <stdlib.h>
#include "sd-json.h"
#include "alloc-util.h"
#include "cryptsetup-util.h"
#include "dlfcn-util.h"
#include "log.h"
#include "parse-util.h"
#include "string-util.h"
#include "strv.h"
#if HAVE_LIBCRYPTSETUP
static void *cryptsetup_dl = NULL;
@@ -338,3 +344,8 @@ int cryptsetup_get_keyslot_from_token(sd_json_variant *v) {
return keyslot;
}
const char* mangle_none(const char *s) {
/* A helper that turns cryptsetup/integritysetup/veritysetup "options" strings into NULL if they are effectively empty */
return isempty(s) || STR_IN_SET(s, "-", "none") ? NULL : s;
}