static int specifier_prefix(char specifier, void *data, void *userdata, char **ret) { UnitFileInstallInfo *i = userdata; assert(i); return unit_name_to_prefix(i->name, ret); }
static int specifier_prefix(char specifier, void *data, void *userdata, char **ret) { InstallInfo *i = userdata; char *n; assert(i); n = unit_name_to_prefix(i->name); if (!n) return -ENOMEM; *ret = n; return 0; }
static char *specifier_prefix_unescaped(char specifier, void *data, void *userdata) { Unit *u = userdata; char *p, *r; assert(u); p = unit_name_to_prefix(u->id); if (!p) return NULL; r = unit_name_unescape(p); free(p); return r; }
static int busname_add_extras(BusName *n) { Unit *u = UNIT(n); int r; assert(n); if (!n->name) { n->name = unit_name_to_prefix(u->id); if (!n->name) return -ENOMEM; } if (!u->description) { r = unit_set_description(u, n->name); if (r < 0) return r; } if (n->activating) { if (!UNIT_DEREF(n->service)) { Unit *x; r = unit_load_related_unit(u, ".service", &x); if (r < 0) return r; unit_ref_set(&n->service, x); } r = unit_add_two_dependencies(u, UNIT_BEFORE, UNIT_TRIGGERS, UNIT_DEREF(n->service), true); if (r < 0) return r; } if (u->default_dependencies) { r = busname_add_default_default_dependencies(n); if (r < 0) return r; } return 0; }
static char *specifier_prefix(char specifier, void *data, void *userdata) { InstallInfo *i = userdata; assert(i); return unit_name_to_prefix(i->name); }
static char *specifier_prefix(char specifier, void *data, void *userdata) { Unit *u = userdata; assert(u); return unit_name_to_prefix(u->id); }