From 07719a21b6425d378b36bb8d7f47ad5ec5296d28 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 23 May 2012 03:43:29 +0200 Subject: manager: rework generator logic Previously generated units were always placed at the end of the search path. With this change there will be three unit dirs instead of one, to place generated entries at the beginning, in the middle and at the end of the search path: beginning: for units that need to override all configuration, regardless of user or vendor. Example use: system-update-generator uses this to temporarily redirect default.target. middle: for units that need to override vendor configuration, but not vendor configuration. Example use: /etc/fstab should override vendor supplied configuration (think /tmp), but should not override native user configuration. end: does not override anything but is available as well. Possible usage might be to convert D-Bus bus service files to native units but allowing vendor supplied native units to win. --- src/shared/strv.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/shared/strv.h') diff --git a/src/shared/strv.h b/src/shared/strv.h index afb31f385f..635e92b728 100644 --- a/src/shared/strv.h +++ b/src/shared/strv.h @@ -47,6 +47,10 @@ char **strv_uniq(char **l); char **strv_new(const char *x, ...) _sentinel_ _malloc_; char **strv_new_ap(const char *x, va_list ap) _malloc_; +static inline const char* STRV_IFNOTNULL(const char *x) { + return x ? x : (const char *) -1; +} + static inline bool strv_isempty(char **l) { return !l || !*l; } -- cgit v1.2.3-54-g00ecf