- r = manager_load_unit(t->meta.manager, rvalue, NULL, NULL, &u);
+ r = manager_load_unit(UNIT(t)->manager, rvalue, NULL, NULL, &u);
if (r < 0) {
log_error("[%s:%u] Failed to load unit %s, ignoring: %s", filename, line, rvalue, bus_error(&error, r));
dbus_error_free(&error);
if (r < 0) {
log_error("[%s:%u] Failed to load unit %s, ignoring: %s", filename, line, rvalue, bus_error(&error, r));
dbus_error_free(&error);
- if ((r = manager_load_unit(t->meta.manager, rvalue, NULL, &error, &u)) < 0) {
+ if ((r = manager_load_unit(UNIT(t)->manager, rvalue, NULL, &error, &u)) < 0) {
log_error("[%s:%u] Failed to load unit %s, ignoring: %s", filename, line, rvalue, bus_error(&error, r));
dbus_error_free(&error);
return 0;
log_error("[%s:%u] Failed to load unit %s, ignoring: %s", filename, line, rvalue, bus_error(&error, r));
dbus_error_free(&error);
return 0;
- r = manager_load_unit(s->meta.manager, rvalue, NULL, &error, &x);
+ r = manager_load_unit(UNIT(s)->manager, rvalue, NULL, &error, &x);
if (r < 0) {
log_error("[%s:%u] Failed to load unit %s, ignoring: %s", filename, line, rvalue, bus_error(&error, r));
dbus_error_free(&error);
if (r < 0) {
log_error("[%s:%u] Failed to load unit %s, ignoring: %s", filename, line, rvalue, bus_error(&error, r));
dbus_error_free(&error);
- LIST_PREPEND(Condition, conditions, u->meta.conditions, c);
+ LIST_PREPEND(Condition, conditions, u->conditions, c);
if (!(c = condition_new(cond, rvalue, trigger, negate)))
return -ENOMEM;
if (!(c = condition_new(cond, rvalue, trigger, negate)))
return -ENOMEM;
- LIST_PREPEND(Condition, conditions, u->meta.conditions, c);
+ LIST_PREPEND(Condition, conditions, u->conditions, c);
if (!(c = condition_new(CONDITION_NULL, NULL, trigger, negate)))
return -ENOMEM;
if (!(c = condition_new(CONDITION_NULL, NULL, trigger, negate)))
return -ENOMEM;
- LIST_PREPEND(Condition, conditions, u->meta.conditions, c);
+ LIST_PREPEND(Condition, conditions, u->conditions, c);
return 0;
}
DEFINE_CONFIG_PARSE_ENUM(config_parse_notify_access, notify_access, NotifyAccess, "Failed to parse notify access specifier");
return 0;
}
DEFINE_CONFIG_PARSE_ENUM(config_parse_notify_access, notify_access, NotifyAccess, "Failed to parse notify access specifier");
/* Instead of opening the path right away, we manually
* follow all symlinks and add their name to our unit
/* Instead of opening the path right away, we manually
* follow all symlinks and add their name to our unit
- if (u->meta.manager->unit_path_cache &&
- !set_get(u->meta.manager->unit_path_cache, filename))
+ if (u->manager->unit_path_cache &&
+ !set_get(u->manager->unit_path_cache, filename))
r = -ENOENT;
else
r = open_follow(&filename, &f, symlink_names, &id);
r = -ENOENT;
else
r = open_follow(&filename, &f, symlink_names, &id);
else {
/* Now, parse the file contents */
r = config_parse(filename, f, UNIT_VTABLE(u)->sections, config_item_perf_lookup, (void*) load_fragment_gperf_lookup, false, u);
if (r < 0)
goto finish;
else {
/* Now, parse the file contents */
r = config_parse(filename, f, UNIT_VTABLE(u)->sections, config_item_perf_lookup, (void*) load_fragment_gperf_lookup, false, u);
if (r < 0)
goto finish;
/* First, try to find the unit under its id. We always look
* for unit files in the default directories, to make it easy
* to override things by placing things in /etc/systemd/system */
/* First, try to find the unit under its id. We always look
* for unit files in the default directories, to make it easy
* to override things by placing things in /etc/systemd/system */
- if (u->meta.load_state == UNIT_STUB)
- SET_FOREACH(t, u->meta.names, i) {
+ if (u->load_state == UNIT_STUB)
+ SET_FOREACH(t, u->names, i) {
/* Hmm, this didn't work? Then let's get rid
* of the fragment path stored for us, so that
* we don't point to an invalid location. */
/* Hmm, this didn't work? Then let's get rid
* of the fragment path stored for us, so that
* we don't point to an invalid location. */
- if (u->meta.load_state == UNIT_STUB)
- SET_FOREACH(t, u->meta.names, i) {
+ if (u->load_state == UNIT_STUB)
+ SET_FOREACH(t, u->names, i) {
} table[] = {
{ config_parse_int, "INTEGER" },
{ config_parse_unsigned, "UNSIGNED" },
} table[] = {
{ config_parse_int, "INTEGER" },
{ config_parse_unsigned, "UNSIGNED" },
{ config_parse_bool, "BOOLEAN" },
{ config_parse_string, "STRING" },
{ config_parse_path, "PATH" },
{ config_parse_bool, "BOOLEAN" },
{ config_parse_string, "STRING" },
{ config_parse_path, "PATH" },