Searched refs:instance (Results 1 - 11 of 11) sorted by relevance

/systemd/src/shared/
H A Dinstall-printf.c51 char *instance; local
56 r = unit_name_to_instance(i->name, &instance);
60 if (!instance) {
61 instance = strdup("");
62 if (!instance)
66 *ret = instance;
102 * %i: the instance (bar)
H A Dinstall.c1083 /* Unit file doesn't exist, however instance
1191 _cleanup_free_ char *instance = NULL; local
1193 r = unit_name_to_instance(i->name, &instance);
1197 r = unit_name_replace_instance(bn, instance, &buffer);
1297 * instance configured */
/systemd/src/test/
H A Dtest-unit-name.c391 char *instance; local
394 r = unit_name_to_instance("foo@bar.service", &instance);
396 assert_se(streq(instance, "bar"));
397 free(instance);
399 r = unit_name_to_instance("foo@.service", &instance);
401 assert_se(streq(instance, ""));
402 free(instance);
404 r = unit_name_to_instance("fo0-stUff_b@b.service", &instance);
406 assert_se(streq(instance, "b"));
407 free(instance);
[all...]
/systemd/src/core/
H A Dunit-printf.c67 return unit_name_unescape(strempty(u->instance), ret);
75 if (u->instance)
76 return unit_name_path_unescape(u->instance, ret);
208 * %i: the instance (bar)
215 { 'i', specifier_string, u->instance },
231 * %f the instance if set, otherwise the id
234 * %R the root of this systemd's instance tree
251 { 'i', specifier_string, u->instance },
H A Dunit.c163 if (!u->instance)
166 r = unit_name_replace_instance(text, u->instance, &s);
199 * instance names however! */
200 if (u->type != _UNIT_TYPE_INVALID && !u->instance != !i)
223 u->instance = i;
248 if (!u->instance)
251 r = unit_name_replace_instance(name, u->instance, &t);
263 /* Determine the new instance from the new id */
270 free(u->instance);
271 u->instance
[all...]
H A Dsocket.c686 static int instance_from_socket(int fd, unsigned nr, char **instance) { argument
692 assert(instance);
784 *instance = r;
1945 _cleanup_free_ char *prefix = NULL, *instance = NULL, *name = NULL; local
1958 r = instance_from_socket(cfd, s->n_accepted, &instance);
1973 r = unit_name_build(prefix, instance, ".service", &name);
2708 * This is strictly for one-instance-per-connection
H A Dunit.h80 char *instance; member in struct:Unit
H A Dload-fragment.c3787 if (u->load_state == UNIT_STUB && u->instance) {
/systemd/src/basic/
H A Dunit-name.c119 /* We allow additional @ in the instance string, we do not
162 int unit_name_to_instance(const char *n, char **instance) { argument
167 assert(instance);
172 /* Everything past the first @ and before the last . is the instance */
175 *instance = NULL;
189 *instance = i;
257 int unit_name_build(const char *prefix, const char *instance, const char *suffix, char **ret) { argument
267 if (instance && !unit_instance_is_valid(instance))
273 if (!instance)
[all...]
H A Dunit-name.h274 /* For prefix+instance and instance the same rules apply */
279 int unit_name_to_instance(const char *n, char **instance);
286 int unit_name_build(const char *prefix, const char *instance, const char *suffix, char **ret);
/systemd/src/tmpfiles/
H A Dtmpfiles.c407 /* Try to detect bind mounts of the same filesystem instance; they
1509 static int remove_item_instance(Item *i, const char *instance) { argument
1517 if (remove(instance) < 0 && errno != ENOENT)
1518 return log_error_errno(errno, "rm(%s): %m", instance);
1526 log_debug("rm -rf \"%s\"", instance);
1527 r = rm_rf(instance, (i->type == RECURSIVE_REMOVE_PATH ? REMOVE_ROOT|REMOVE_SUBVOLUME : 0) | REMOVE_PHYSICAL);
1529 return log_error_errno(r, "rm_rf(%s): %m", instance);
1584 static int clean_item_instance(Item *i, const char* instance) { argument
1602 d = opendir_nomod(instance);
1605 log_debug_errno(errno, "Directory \"%s\": %m", instance);
[all...]

Completed in 2382 milliseconds