From db840bdc199daedc5fab9564e0337ccd449d1460 Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Sun, 6 Jul 2025 03:03:59 +0200 Subject: [PATCH] Follow-up to 8be7a46, simplify linking of tmpfiles program Signed-off-by: Joachim Wiberg --- src/Makefile.am | 9 ++------- src/tmpfiles.c | 23 +---------------------- 2 files changed, 3 insertions(+), 29 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index f9fb60ec..849e8e59 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -44,13 +44,8 @@ sulogin_SOURCES = sulogin.c sulogin_CFLAGS = -W -Wall -Wextra -std=gnu99 sulogin_LDADD = -lcrypt -tmpfiles_SOURCES = tmpfiles.c helpers.c util.c exec.c log.c \ - svc.c sig.c sm.c api.c mount.c service.c \ - schedule.c cond.c cond-w.c pid.c plugin.c \ - utmp-api.c client.c cgroup.c mdadm.c tty.c \ - iwatch.c conf.c devmon.c logrotate.c stty.c \ - runparts.c -tmpfiles_CFLAGS = -W -Wall -Wextra -std=gnu99 -D__FINIT__ +tmpfiles_SOURCES = tmpfiles.c util.c util.h log.h +tmpfiles_CFLAGS = -W -Wall -Wextra -std=gnu99 tmpfiles_CFLAGS += $(lite_CFLAGS) $(uev_CFLAGS) tmpfiles_LDADD = $(lite_LIBS) $(uev_LIBS) diff --git a/src/tmpfiles.c b/src/tmpfiles.c index c23e23cb..5655a766 100644 --- a/src/tmpfiles.c +++ b/src/tmpfiles.c @@ -40,31 +40,10 @@ # include #endif -#include "svc.h" -#include "helpers.h" #include "log.h" #include "util.h" int debug; -int runlevel; -char *osheading; -svc_t *wdog; -uev_ctx_t *ctx; -int syncsec; -int rescue; -char *network; -int cfglevel; -char *finit_rcsd; -char *sdown; -char *hostname; -int bootstrap; -int single; -int readiness; -char *finit_conf; -char *fstab; -int prevlevel; -int cmdlevel; -int kerndebug; int c_flag = 0; int r_flag = 0; @@ -539,7 +518,7 @@ static void tmpfiles(char *line) for (size_t i = 0; i < gl.gl_pathc; i++) { snprintf(buf, sizeof(buf), "restorecon %s %s", opts, gl.gl_pathv[i]); - run(buf, "restorecon"); + system(buf); } break; default: