X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Funit.h;h=aa818d4f2115d405300553c3b98882f8f9ef144e;hp=47a1eb635036156df05e216c4bd7f67931845e40;hb=b9c0d4415b8cd6135321185b6febfdd1366a477c;hpb=f976f3f67ce5140dc0ba48e0c21a91a553905c57 diff --git a/src/unit.h b/src/unit.h index 47a1eb635..aa818d4f2 100644 --- a/src/unit.h +++ b/src/unit.h @@ -39,7 +39,6 @@ typedef enum UnitDependency UnitDependency; #include "socket-util.h" #include "execute.h" -#define UNIT_NAME_MAX 256 #define DEFAULT_TIMEOUT_USEC (60*USEC_PER_SEC) #define DEFAULT_RESTART_USEC (100*USEC_PER_MSEC) @@ -63,6 +62,7 @@ enum UnitLoadState { UNIT_LOADED, UNIT_ERROR, UNIT_MERGED, + UNIT_BANNED, _UNIT_LOAD_STATE_MAX, _UNIT_LOAD_STATE_INVALID = -1 }; @@ -504,6 +504,9 @@ bool unit_pending_active(Unit *u); int unit_add_default_target_dependency(Unit *u, Unit *target); +UnitType unit_name_to_type(const char *n); +bool unit_name_is_valid(const char *n, bool template_ok); + const char *unit_load_state_to_string(UnitLoadState i); UnitLoadState unit_load_state_from_string(const char *s);