Move module-util.h to src/shared/ and load_module() to libshared

Unfortunately this needs libshared to link to libkmod. Before it was linked
into systemd-udevd, udevadm, and systemd each seperately. On most systems this
doesn't make much difference, because at least systemd would be installed, but
it might not be in small chroots. It is a small library, so I hope this is not
a big issue.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2018-07-16 13:08:40 +02:00
parent 6755bb5548
commit 3cb9b42af3
5 changed files with 71 additions and 62 deletions
-1
View File
@@ -121,7 +121,6 @@ basic_sources = files('''
mkdir-label.c
mkdir.c
mkdir.h
module-util.h
mount-util.c
mount-util.h
nss-util.h
-10
View File
@@ -1,10 +0,0 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
#pragma once
#include <libkmod.h>
#include "macro.h"
DEFINE_TRIVIAL_CLEANUP_FUNC(struct kmod_ctx*, kmod_unref);
DEFINE_TRIVIAL_CLEANUP_FUNC(struct kmod_module*, kmod_module_unref);
DEFINE_TRIVIAL_CLEANUP_FUNC(struct kmod_list*, kmod_module_unref_list);