tree-wide: convert dlopen_*() callers to DLOPEN_* wrapper macros
Switch the executable-owned call sites from the plain dlopen_<lib>() helpers to the new DLOPEN_<LIB>() macros, so that each binary that loads an optional library at runtime now carries its own .note.dlopen note instead of relying solely on libsystemd-shared. Each call site passes a priority reflecting whether it hard-depends on the library (required) or degrades gracefully without it (recommended). Co-developed-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -538,7 +538,7 @@ static int parse_one_option(const char *option) {
|
||||
#if HAVE_OPENSSL
|
||||
_cleanup_strv_free_ char **l = NULL;
|
||||
|
||||
r = dlopen_libcrypto(LOG_ERR);
|
||||
r = DLOPEN_LIBCRYPTO(LOG_ERR, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
@@ -2881,7 +2881,7 @@ static int run(int argc, char *argv[]) {
|
||||
if (r <= 0)
|
||||
return r;
|
||||
|
||||
r = dlopen_cryptsetup(LOG_ERR);
|
||||
r = DLOPEN_CRYPTSETUP(LOG_ERR, SD_ELF_NOTE_DLOPEN_PRIORITY_REQUIRED);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user