]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
shutdown: rearrange shutdown sources in source tree 11896/head
authorLennart Poettering <lennart@poettering.net>
Tue, 5 Mar 2019 11:12:33 +0000 (12:12 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 5 Mar 2019 11:21:17 +0000 (12:21 +0100)
Let's move the shutdown binary into its own subdirectory in
src/shutdown, after all it is relatively isolated from the normal PID 1
sources, being a different binary and all.

Unfortunately it's not possible to move some of the code, since it is
shared with PID 1, that I wished we could move, but I still think it's
worth it.

meson.build
src/core/meson.build
src/shutdown/meson.build [new file with mode: 0644]
src/shutdown/shutdown.c [moved from src/core/shutdown.c with 100% similarity]
src/shutdown/umount.c [moved from src/core/umount.c with 100% similarity]
src/shutdown/umount.h [moved from src/core/umount.h with 100% similarity]
src/test/meson.build

index 239f13c061455ec5f43d2c99ad977a8087e7bda0..f2b975abc5555a8d2a986ad3c31e62007841e6e5 100644 (file)
@@ -1441,6 +1441,7 @@ includes = include_directories('src/basic',
                                'src/udev',
                                'src/libudev',
                                'src/core',
+                               'src/shutdown',
                                'src/libsystemd/sd-bus',
                                'src/libsystemd/sd-device',
                                'src/libsystemd/sd-event',
@@ -1527,6 +1528,7 @@ public_programs = []
 subdir('src/libudev')
 subdir('src/shared')
 subdir('src/core')
+subdir('src/shutdown')
 subdir('src/udev')
 subdir('src/network')
 
@@ -2676,6 +2678,10 @@ public_programs += exe
 
 executable('systemd-shutdown',
            systemd_shutdown_sources,
+           'src/core/mount-setup.c',
+           'src/core/mount-setup.h',
+           'src/core/killall.c',
+           'src/core/killall.h',
            include_directories : includes,
            link_with : [libshared],
            dependencies : [libmount],
index 88fb093732b6bb464c4adb6f6e0733cc0f92ab62..6f387c4796ae03908e00e50d6345dd7b2d25adfd 100644 (file)
@@ -163,16 +163,6 @@ libcore = static_library(
 
 systemd_sources = files('main.c')
 
-systemd_shutdown_sources = files('''
-        shutdown.c
-        umount.c
-        umount.h
-        mount-setup.c
-        mount-setup.h
-        killall.c
-        killall.h
-'''.split())
-
 in_files = [['macros.systemd',   rpmmacrosdir],
             ['system.conf',      pkgsysconfdir],
             ['systemd.pc',       pkgconfigdatadir],
diff --git a/src/shutdown/meson.build b/src/shutdown/meson.build
new file mode 100644 (file)
index 0000000..ebf0bed
--- /dev/null
@@ -0,0 +1,5 @@
+systemd_shutdown_sources = files('''
+        shutdown.c
+        umount.c
+        umount.h
+'''.split())
similarity index 100%
rename from src/core/shutdown.c
rename to src/shutdown/shutdown.c
similarity index 100%
rename from src/core/umount.c
rename to src/shutdown/umount.c
similarity index 100%
rename from src/core/umount.h
rename to src/shutdown/umount.h
index c53b9653f95222bacdc9a025da5f99ccb85829e9..e43f119230d7485f7597ec2b49ac7cb373966521 100644 (file)
@@ -716,8 +716,8 @@ tests += [
         [['src/test/test-umount.c',
           'src/core/mount-setup.c',
           'src/core/mount-setup.h',
-          'src/core/umount.c',
-          'src/core/umount.h'],
+          'src/shutdown/umount.c',
+          'src/shutdown/umount.h'],
          [],
          [libmount]],