master - scripts: simplify including for generator
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=0161ebe484005e948eab6b12bc3942e62a22819b Commit: 0161ebe484005e948eab6b12bc3942e62a22819b Parent: a4577c427a76c6a337b7812f9da7700c2c8beb89 Author: Zdenek Kabelac <[email protected]> AuthorDate: Fri Dec 21 19:14:32 2018 +0100 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Fri Dec 21 21:42:30 2018 +0100
scripts: simplify including for generator
Uses included .c file as primary header includer.
--- scripts/generator-internals.c | 2 ++ .../lvm2_activation_generator_systemd_red_hat.c | 20 -------------------- test/unit/activation-generator_t.c | 2 -- 3 files changed, 2 insertions(+), 22 deletions(-)
scripts/generator-internals.c +2 -0
@@ -1,6 +1,8 @@// This file contains the unit testable parts of // lvm2_activation_generator_systemd_red_hat +#include "device_mapper/all.h" +#include <ctype.h> #include <errno.h> #include <fcntl.h>
scripts/lvm2_activation_generator_systemd_red_hat.c +0 -20
@@ -12,29 +12,9 @@* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include <ctype.h> -#include <errno.h> -#include <fcntl.h> -#include <limits.h> /* For PATH_MAX for musl libc */ -#include <stdarg.h> -#include <stdbool.h> -#include <stdio.h> -#include <string.h> -#include <syslog.h> -#include <sys/stat.h> -#include <sys/types.h> -#include <sys/wait.h> -#include <unistd.h> - -#include "configure.h" -#include "device_mapper/all.h" - -//---------------------------------------------------------------- -// Code in this file gets included in the unit tests. #include "generator-internals.c" -//---------------------------------------------------------------- // Logging #define KMSG_DEV_PATH "/dev/kmsg"
test/unit/activation-generator_t.c +0 -2
@@ -15,8 +15,6 @@#include "units.h" #include "scripts/generator-internals.c" -#include "device_mapper/all.h" -//---------------------------------------------------------------- static void _error (const char *format, ...)