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:
@@ -506,7 +506,7 @@ static int builtin_blkid(UdevEvent *event, int argc, char *argv[]) {
|
||||
int64_t offset = 0;
|
||||
int r;
|
||||
|
||||
r = dlopen_libblkid(LOG_DEBUG);
|
||||
r = DLOPEN_LIBBLKID(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_REQUIRED);
|
||||
if (r < 0)
|
||||
return log_device_debug_errno(dev, r, "blkid not available: %m");
|
||||
|
||||
|
||||
+5
-5
@@ -58,11 +58,11 @@ int run_udevd(int argc, char *argv[]) {
|
||||
return log_error_errno(r, "Failed to create /run/udev: %m");
|
||||
|
||||
/* Load some shared libraries before we fork any workers */
|
||||
(void) dlopen_libacl(LOG_DEBUG);
|
||||
(void) dlopen_libblkid(LOG_DEBUG);
|
||||
(void) dlopen_libkmod(LOG_DEBUG);
|
||||
(void) dlopen_libmount(LOG_DEBUG);
|
||||
(void) dlopen_tpm2(LOG_DEBUG);
|
||||
(void) DLOPEN_LIBACL(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED);
|
||||
(void) DLOPEN_LIBBLKID(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED);
|
||||
(void) DLOPEN_LIBKMOD(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED);
|
||||
(void) DLOPEN_LIBMOUNT(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED);
|
||||
(void) DLOPEN_TPM2(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED);
|
||||
|
||||
if (arg_daemonize) {
|
||||
pid_t pid;
|
||||
|
||||
Reference in New Issue
Block a user