type
stringclasses
5 values
content
stringlengths
9
163k
defines
#define ROMSTAGE_RAM_STACK_SIZE 0x5000
functions
void reset_system(void) { hard_reset(); halt(); }
functions
long choose_top_of_stack(void) { unsigned long stack_top; /* cbmem_add() does a find() before add(). */ stack_top = (unsigned long)cbmem_add(CBMEM_ID_ROMSTAGE_RAM_STACK, ROMSTAGE_RAM_STACK_SIZE); stack_top += ROMSTAGE_RAM_STACK_SIZE; return stack_top; }
functions
asmlinkage romstage_main(unsigned long bist) { int i; void *romstage_stack_after_car; const int num_guards = 4; const u32 stack_guard = 0xdeadbeef; u32 *stack_base = (void *)(CONFIG_DCACHE_RAM_BASE + CONFIG_DCACHE_RAM_SIZE - CONFIG_DCACHE_RAM_ROMSTAGE_STACK_S...
functions
void romstage_common(const struct romstage_params *params) { int boot_mode; int wake_from_s3; struct romstage_handoff *handoff; timestamp_init(get_initial_timestamp()); timestamp_add_now(TS_START_ROMSTAGE); if (params->bist == 0) enable_lapic(); wake_from_s3 = early_pch_init(params->gpio_map, params->rcba_c...
functions
void prepare_for_resume(struct romstage_handoff *handoff) { /* Only need to save memory when ramstage isn't relocatable. */ #if !CONFIG_RELOCATABLE_RAMSTAGE #if CONFIG_HAVE_ACPI_RESUME /* Back up the OS-controlled memory where ramstage will be loaded. */ if (handoff != NULL && handoff->s3_resume) { void *src = (voi...
functions
void romstage_after_car(void) { struct romstage_handoff *handoff; handoff = romstage_handoff_find_or_add(); prepare_for_resume(handoff); /* Load the ramstage. */ copy_and_run(); }
functions
void stage_cache_external_region(void **base, size_t *size) { /* The ramstage cache lives in the TSEG region at RESERVED_SMM_OFFSET. * The top of ram is defined to be the TSEG base address. */ *size = RESERVED_SMM_SIZE; *base = (void *)((uint32_t)cbmem_top() + RESERVED_SMM_OFFSET); }
functions
void ramstage_cache_invalid(void) { #if CONFIG_RESET_ON_INVALID_RAMSTAGE_CACHE reset_system(); #endif }
structs
struct WMcursor { int unused; };
functions
void VGL_FreeWMCursor(_THIS, WMcursor *cursor) { return; }
functions
int VGL_ShowWMCursor(_THIS, WMcursor *cursor) { return(0); }
functions
void VGL_WarpWMCursor(_THIS, Uint16 x, Uint16 y) { SDL_PrivateMouseMotion(0, 0, x, y); }
includes
#include <errno.h>
includes
#include <stdlib.h>
includes
#include <string.h>
includes
#include <sys/stat.h>
includes
#include <unistd.h>
functions
bool unit_has_name(Unit *u, const char *name) { assert(u); assert(name); return !!set_get(u->names, (char*) name); }
functions
void unit_init(Unit *u) { CGroupContext *cc; ExecContext *ec; KillContext *kc; assert(u); assert(u->manager); assert(u->type >= 0); cc = unit_get_cgroup_context(u); if (cc) { cgroup_context_init(cc); /* Copy in the manage...
functions
int unit_add_name(Unit *u, const char *text) { _cleanup_free_ char *s = NULL, *i = NULL; UnitType t; int r; assert(u); assert(text); if (unit_name_is_valid(text, UNIT_NAME_TEMPLATE)) { if (!u->instance) return -EINVAL; ...
functions
int unit_choose_id(Unit *u, const char *name) { _cleanup_free_ char *t = NULL; char *s, *i; int r; assert(u); assert(name); if (unit_name_is_valid(name, UNIT_NAME_TEMPLATE)) { if (!u->instance) return -EINVAL; r ...
functions
int unit_set_description(Unit *u, const char *description) { char *s; assert(u); if (isempty(description)) s = NULL; else { s = strdup(description); if (!s) return -ENOMEM; }
functions
bool unit_check_gc(Unit *u) { UnitActiveState state; assert(u); if (u->job) return true; if (u->nop_job) return true; state = unit_active_state(u); /* If the unit is inactive and failed and no job is queued for * it, then relea...
functions
void unit_add_to_load_queue(Unit *u) { assert(u); assert(u->type != _UNIT_TYPE_INVALID); if (u->load_state != UNIT_STUB || u->in_load_queue) return; LIST_PREPEND(load_queue, u->manager->load_queue, u); u->in_load_queue = true; }
functions
void unit_add_to_cleanup_queue(Unit *u) { assert(u); if (u->in_cleanup_queue) return; LIST_PREPEND(cleanup_queue, u->manager->cleanup_queue, u); u->in_cleanup_queue = true; }
functions
void unit_add_to_gc_queue(Unit *u) { assert(u); if (u->in_gc_queue || u->in_cleanup_queue) return; if (unit_check_gc(u)) return; LIST_PREPEND(gc_queue, u->manager->gc_queue, u); u->in_gc_queue = true; u->manager->n_in_gc_queue ++; }
functions
void unit_add_to_dbus_queue(Unit *u) { assert(u); assert(u->type != _UNIT_TYPE_INVALID); if (u->load_state == UNIT_STUB || u->in_dbus_queue) return; /* Shortcut things if nobody cares */ if (sd_bus_track_count(u->manager->subscribed) <= 0 && set_isem...
functions
void bidi_set_free(Unit *u, Set *s) { Iterator i; Unit *other; assert(u); /* Frees the set and makes sure we are dropped from the * inverse pointers */ SET_FOREACH(other, s, i) { UnitDependency d; for (d = 0; d < _UNIT_DEPENDENCY_MAX; ...
functions
void unit_remove_transient(Unit *u) { char **i; assert(u); if (!u->transient) return; if (u->fragment_path) (void) unlink(u->fragment_path); STRV_FOREACH(i, u->dropin_paths) { _cleanup_free_ char *p = NULL; (voi...
functions
void unit_free_requires_mounts_for(Unit *u) { char **j; STRV_FOREACH(j, u->requires_mounts_for) { char s[strlen(*j) + 1]; PATH_FOREACH_PREFIX_MORE(s, *j) { char *y; Set *x; x = hashmap_get2(u->mana...
functions
void unit_done(Unit *u) { ExecContext *ec; CGroupContext *cc; int r; assert(u); if (u->type < 0) return; if (UNIT_VTABLE(u)->done) UNIT_VTABLE(u)->done(u); ec = unit_get_exec_context(u); if (ec) exec_cont...
functions
void unit_free(Unit *u) { UnitDependency d; Iterator i; char *t; assert(u); if (u->manager->n_reloading <= 0) unit_remove_transient(u); bus_unit_send_removed_signal(u); unit_done(u); sd_bus_slot_unref(u->match_bus_slot); unit_...
functions
UnitActiveState unit_active_state(Unit *u) { assert(u); if (u->load_state == UNIT_MERGED) return unit_active_state(unit_follow_merge(u)); /* After a reload it might happen that a unit is not correctly * loaded but still has a process around. That's why we won't ...
functions
int complete_move(Set **s, Set **other) { int r; assert(s); assert(other); if (!*other) return 0; if (*s) { r = set_move(*s, *other); if (r < 0) return r; }
functions
int merge_names(Unit *u, Unit *other) { char *t; Iterator i; int r; assert(u); assert(other); r = complete_move(&u->names, &other->names); if (r < 0) return r; set_free_free(other->names); other->names = NULL; other->id =...
functions
int reserve_dependencies(Unit *u, Unit *other, UnitDependency d) { unsigned n_reserve; assert(u); assert(other); assert(d < _UNIT_DEPENDENCY_MAX); /* * If u does not have this dependency set allocated, there is no need * to reserve anything. In that case other...
functions
void merge_dependencies(Unit *u, Unit *other, const char *other_id, UnitDependency d) { Iterator i; Unit *back; int r; assert(u); assert(other); assert(d < _UNIT_DEPENDENCY_MAX); /* Fix backwards pointers */ SET_FOREACH(back, other->dependencies[d], i) {...
functions
int unit_merge(Unit *u, Unit *other) { UnitDependency d; const char *other_id = NULL; int r; assert(u); assert(other); assert(u->manager == other->manager); assert(u->type != _UNIT_TYPE_INVALID); other = unit_follow_merge(other); if (other == u)...
functions
int unit_merge_by_name(Unit *u, const char *name) { Unit *other; int r; _cleanup_free_ char *s = NULL; assert(u); assert(name); if (unit_name_is_valid(name, UNIT_NAME_TEMPLATE)) { if (!u->instance) return -EINVAL; ...
functions
int unit_add_exec_dependencies(Unit *u, ExecContext *c) { int r; assert(u); assert(c); if (c->working_directory) { r = unit_require_mounts_for(u, c->working_directory); if (r < 0) return r; }
functions
void unit_dump(Unit *u, FILE *f, const char *prefix) { char *t, **j; UnitDependency d; Iterator i; const char *prefix2; char timestamp1[FORMAT_TIMESTAMP_MAX], timestamp2[FORMAT_TIMESTAMP_MAX], timestamp3[FORMAT_TIMESTAMP_MAX], ...
functions
int unit_load_fragment_and_dropin(Unit *u) { int r; assert(u); /* Load a .{service,socket,...}
functions
int unit_load_fragment_and_dropin_optional(Unit *u) { int r; assert(u); /* Same as unit_load_fragment_and_dropin(), but whether * something can be loaded or not doesn't matter. */ /* Load a .service file */ r = unit_load_fragment(u); if (r < 0) ...
functions
int unit_add_default_target_dependency(Unit *u, Unit *target) { assert(u); assert(target); if (target->type != UNIT_TARGET) return 0; /* Only add the dependency if both units are loaded, so that * that loop check below is reliable */ if (u->load_state !...
functions
int unit_add_target_dependencies(Unit *u) { static const UnitDependency deps[] = { UNIT_REQUIRED_BY, UNIT_REQUISITE_OF, UNIT_WANTED_BY, UNIT_BOUND_BY }
functions
int unit_add_slice_dependencies(Unit *u) { assert(u); if (!UNIT_HAS_CGROUP_CONTEXT(u)) return 0; if (UNIT_ISSET(u->slice)) return unit_add_two_dependencies(u, UNIT_AFTER, UNIT_REQUIRES, UNIT_DEREF(u->slice), true); if (unit_has_name(u, SPECIAL_ROOT_SLIC...
functions
int unit_add_mount_dependencies(Unit *u) { char **i; int r; assert(u); STRV_FOREACH(i, u->requires_mounts_for) { char prefix[strlen(*i) + 1]; PATH_FOREACH_PREFIX_MORE(prefix, *i) { _cleanup_free_ char *p = NULL; ...
functions
int unit_add_startup_units(Unit *u) { CGroupContext *c; int r; c = unit_get_cgroup_context(u); if (!c) return 0; if (c->startup_cpu_shares == CGROUP_CPU_SHARES_INVALID && c->startup_blockio_weight == CGROUP_BLKIO_WEIGHT_INVALID) retur...
functions
int unit_load(Unit *u) { int r; assert(u); if (u->in_load_queue) { LIST_REMOVE(load_queue, u->manager->load_queue, u); u->in_load_queue = false; }
functions
bool unit_condition_test(Unit *u) { assert(u); dual_timestamp_get(&u->condition_timestamp); u->condition_result = unit_condition_test_list(u, u->conditions, condition_type_to_string); return u->condition_result; }
functions
bool unit_assert_test(Unit *u) { assert(u); dual_timestamp_get(&u->assert_timestamp); u->assert_result = unit_condition_test_list(u, u->asserts, assert_type_to_string); return u->assert_result; }
functions
void unit_status_print_starting_stopping(Unit *u, JobType t) { const char *format; assert(u); format = unit_get_status_message_format(u, t); DISABLE_WARNING_FORMAT_NONLITERAL; unit_status_printf(u, "", format); REENABLE_WARNING; }
functions
void unit_status_log_starting_stopping_reloading(Unit *u, JobType t) { const char *format; char buf[LINE_MAX]; sd_id128_t mid; assert(u); if (t != JOB_START && t != JOB_STOP && t != JOB_RELOAD) return; if (log_on_console()) return; ...
functions
void unit_status_emit_starting_stopping_reloading(Unit *u, JobType t) { unit_status_log_starting_stopping_reloading(u, t); /* Reload status messages have traditionally not been printed to console. */ if (t != JOB_RELOAD) unit_status_print_starting_stopping(u, t); }
functions
int unit_start(Unit *u) { UnitActiveState state; Unit *following; assert(u); /* Units that aren't loaded cannot be started */ if (u->load_state != UNIT_LOADED) return -EINVAL; /* If this is already started, then this will succeed. Note * that t...
functions
bool unit_can_start(Unit *u) { assert(u); if (u->load_state != UNIT_LOADED) return false; if (!unit_supported(u)) return false; return !!UNIT_VTABLE(u)->start; }
functions
bool unit_can_isolate(Unit *u) { assert(u); return unit_can_start(u) && u->allow_isolate; }
functions
int unit_stop(Unit *u) { UnitActiveState state; Unit *following; assert(u); state = unit_active_state(u); if (UNIT_IS_INACTIVE_OR_FAILED(state)) return -EALREADY; following = unit_following(u); if (following) { log_unit_debug(u, ...
functions
int unit_reload(Unit *u) { UnitActiveState state; Unit *following; assert(u); if (u->load_state != UNIT_LOADED) return -EINVAL; if (!unit_can_reload(u)) return -EBADR; state = unit_active_state(u); if (state == UNIT_RELOADING) ...
functions
bool unit_can_reload(Unit *u) { assert(u); if (!UNIT_VTABLE(u)->reload) return false; if (!UNIT_VTABLE(u)->can_reload) return true; return UNIT_VTABLE(u)->can_reload(u); }
functions
void unit_check_unneeded(Unit *u) { _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL; static const UnitDependency needed_dependencies[] = { UNIT_REQUIRED_BY, UNIT_REQUISITE_OF, UNIT_WANTED_BY, UNIT_BOUND_BY, }
functions
void unit_check_binds_to(Unit *u) { _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL; bool stop = false; Unit *other; Iterator i; int r; assert(u); if (u->job) return; if (unit_active_state(u) != UNIT_ACTIVE) ...
functions
void retroactively_start_dependencies(Unit *u) { Iterator i; Unit *other; assert(u); assert(UNIT_IS_ACTIVE_OR_ACTIVATING(unit_active_state(u))); SET_FOREACH(other, u->dependencies[UNIT_REQUIRES], i) if (!set_get(u->dependencies[UNIT_AFTER], other) && ...
functions
void retroactively_stop_dependencies(Unit *u) { Iterator i; Unit *other; assert(u); assert(UNIT_IS_INACTIVE_OR_DEACTIVATING(unit_active_state(u))); /* Pull down units which are bound to us recursively if enabled */ SET_FOREACH(other, u->dependencies[UNIT_BOUND_BY], i) ...
functions
void check_unneeded_dependencies(Unit *u) { Iterator i; Unit *other; assert(u); assert(UNIT_IS_INACTIVE_OR_DEACTIVATING(unit_active_state(u))); /* Garbage collect services that might not be needed anymore, if enabled */ SET_FOREACH(other, u->dependencies[UNIT_REQUIRES],...
functions
void unit_start_on_failure(Unit *u) { Unit *other; Iterator i; assert(u); if (set_size(u->dependencies[UNIT_ON_FAILURE]) <= 0) return; log_unit_info(u, "Triggering OnFailure= dependencies."); SET_FOREACH(other, u->dependencies[UNIT_ON_FAILURE], i) { ...
functions
void unit_trigger_notify(Unit *u) { Unit *other; Iterator i; assert(u); SET_FOREACH(other, u->dependencies[UNIT_TRIGGERED_BY], i) if (UNIT_VTABLE(other)->trigger_notify) UNIT_VTABLE(other)->trigger_notify(other, u); }
functions
void unit_notify(Unit *u, UnitActiveState os, UnitActiveState ns, bool reload_success) { Manager *m; bool unexpected; assert(u); assert(os < _UNIT_ACTIVE_STATE_MAX); assert(ns < _UNIT_ACTIVE_STATE_MAX); /* Note that this is called for all low-level state changes, ...
functions
else if (u->job->state == JOB_RUNNING && ns != UNIT_ACTIVATING) { unexpected = true; if (UNIT_IS_INACTIVE_OR_FAILED(ns)) job_finish_and_invalidate(u->job, ns == UNIT_FAILED ? JOB_FAILED : JOB_DONE, true); ...
functions
else if (ns != UNIT_ACTIVATING && ns != UNIT_RELOADING) { unexpected = true; if (UNIT_IS_INACTIVE_OR_FAILED(ns)) job_finish_and_invalidate(u->job, ns == UNIT_FAILED ? JOB_FAILED : JOB_DONE, t...
functions
else if (u->job->state == JOB_RUNNING && ns != UNIT_DEACTIVATING) { unexpected = true; job_finish_and_invalidate(u->job, JOB_FAILED, true); }
functions
int unit_watch_pid(Unit *u, pid_t pid) { int q, r; assert(u); assert(pid >= 1); /* Watch a specific PID. We only support one or two units * watching each PID for now, not more. */ r = set_ensure_allocated(&u->pids, NULL); if (r < 0) return r; ...
functions
void unit_unwatch_pid(Unit *u, pid_t pid) { assert(u); assert(pid >= 1); (void) hashmap_remove_value(u->manager->watch_pids1, PID_TO_PTR(pid), u); (void) hashmap_remove_value(u->manager->watch_pids2, PID_TO_PTR(pid), u); (void) set_remove(u->pids, PID_TO_PTR(pid)); }
functions
void unit_unwatch_all_pids(Unit *u) { assert(u); while (!set_isempty(u->pids)) unit_unwatch_pid(u, PTR_TO_PID(set_first(u->pids))); u->pids = set_free(u->pids); }
functions
void unit_tidy_watch_pids(Unit *u, pid_t except1, pid_t except2) { Iterator i; void *e; assert(u); /* Cleans dead PIDs from our list */ SET_FOREACH(e, u->pids, i) { pid_t pid = PTR_TO_PID(e); if (pid == except1 || pid == except2) ...
functions
bool unit_job_is_applicable(Unit *u, JobType j) { assert(u); assert(j >= 0 && j < _JOB_TYPE_MAX); switch (j) { case JOB_VERIFY_ACTIVE: case JOB_START: case JOB_STOP: case JOB_NOP: return true; case JOB_RESTART: case JOB_TRY_RESTA...
functions
void maybe_warn_about_dependency(Unit *u, const char *other, UnitDependency dependency) { assert(u); /* Only warn about some unit types */ if (!IN_SET(dependency, UNIT_CONFLICTS, UNIT_CONFLICTED_BY, UNIT_BEFORE, UNIT_AFTER, UNIT_ON_FAILURE, UNIT_TRIGGERS, UNIT_TRIGGERED_BY)) ret...
functions
int unit_add_dependency(Unit *u, UnitDependency d, Unit *other, bool add_reference) { static const UnitDependency inverse_table[_UNIT_DEPENDENCY_MAX] = { [UNIT_REQUIRES] = UNIT_REQUIRED_BY, [UNIT_WANTS] = UNIT_WANTED_BY, [UNIT_REQUISITE] = UNIT_REQUISITE_OF, ...
functions
int unit_add_two_dependencies(Unit *u, UnitDependency d, UnitDependency e, Unit *other, bool add_reference) { int r; assert(u); r = unit_add_dependency(u, d, other, add_reference); if (r < 0) return r; return unit_add_dependency(u, e, other, add_reference); }
functions
int resolve_template(Unit *u, const char *name, const char*path, char **buf, const char **ret) { int r; assert(u); assert(name || path); assert(buf); assert(ret); if (!name) name = basename(path); if (!unit_name_is_valid(name, UNIT_NAME_TEMPLATE...
functions
int unit_add_dependency_by_name(Unit *u, UnitDependency d, const char *name, const char *path, bool add_reference) { _cleanup_free_ char *buf = NULL; Unit *other; int r; assert(u); assert(name || path); r = resolve_template(u, name, path, &buf, &name); if (r < 0...
functions
int unit_add_two_dependencies_by_name(Unit *u, UnitDependency d, UnitDependency e, const char *name, const char *path, bool add_reference) { _cleanup_free_ char *buf = NULL; Unit *other; int r; assert(u); assert(name || path); r = resolve_template(u, name, path, &buf, &...
functions
int set_unit_path(const char *p) { /* This is mostly for debug purposes */ if (setenv("SYSTEMD_UNIT_PATH", p, 1) < 0) return -errno; return 0; }
functions
int unit_set_slice(Unit *u, Unit *slice) { assert(u); assert(slice); /* Sets the unit slice if it has not been set before. Is extra * careful, to only allow this for units that actually have a * cgroup context. Also, we don't allow to set this for slices * (since the ...
functions
int unit_set_default_slice(Unit *u) { _cleanup_free_ char *b = NULL; const char *slice_name; Unit *slice; int r; assert(u); if (UNIT_ISSET(u->slice)) return 0; if (u->instance) { _cleanup_free_ char *prefix = NULL, *escaped = NUL...
functions
int unit_load_related_unit(Unit *u, const char *type, Unit **_found) { _cleanup_free_ char *t = NULL; int r; assert(u); assert(type); assert(_found); r = unit_name_change_suffix(u->id, type, &t); if (r < 0) return r; if (unit_has_name(u, ...
functions
int signal_name_owner_changed(sd_bus_message *message, void *userdata, sd_bus_error *error) { const char *name, *old_owner, *new_owner; Unit *u = userdata; int r; assert(message); assert(u); r = sd_bus_message_read(message, "sss", &name, &old_owner, &new_owner); ...
functions
int unit_install_bus_match(Unit *u, sd_bus *bus, const char *name) { const char *match; assert(u); assert(bus); assert(name); if (u->match_bus_slot) return -EBUSY; match = strjoina("type='signal'," "sender='org.freedesktop.DBus',...
functions
int unit_watch_bus_name(Unit *u, const char *name) { int r; assert(u); assert(name); /* Watch a specific name on the bus. We only support one unit * watching each name for now. */ if (u->manager->api_bus) { /* If the bus is already available, install t...
functions
void unit_unwatch_bus_name(Unit *u, const char *name) { assert(u); assert(name); hashmap_remove_value(u->manager->watch_bus, name, u); u->match_bus_slot = sd_bus_slot_unref(u->match_bus_slot); }
functions
bool unit_can_serialize(Unit *u) { assert(u); return UNIT_VTABLE(u)->serialize && UNIT_VTABLE(u)->deserialize_item; }
functions
int unit_serialize(Unit *u, FILE *f, FDSet *fds, bool serialize_jobs) { int r; assert(u); assert(f); assert(fds); if (unit_can_serialize(u)) { ExecRuntime *rt; r = UNIT_VTABLE(u)->serialize(u, f, fds); if (r < 0) ...
functions
int unit_serialize_item(Unit *u, FILE *f, const char *key, const char *value) { assert(u); assert(f); assert(key); if (!value) return 0; fputs(key, f); fputc('=', f); fputs(value, f); fputc('\n', f); return 1; }
functions
int unit_serialize_item_escaped(Unit *u, FILE *f, const char *key, const char *value) { _cleanup_free_ char *c = NULL; assert(u); assert(f); assert(key); if (!value) return 0; c = cescape(value); if (!c) return -ENOMEM; ...
functions
int unit_serialize_item_fd(Unit *u, FILE *f, FDSet *fds, const char *key, int fd) { int copy; assert(u); assert(f); assert(key); if (fd < 0) return 0; copy = fdset_put_dup(fds, fd); if (copy < 0) return copy; fprintf(f, ...
functions
void unit_serialize_item_format(Unit *u, FILE *f, const char *key, const char *format, ...) { va_list ap; assert(u); assert(f); assert(key); assert(format); fputs(key, f); fputc('=', f); va_start(ap, format); vfprintf(f, format, ap); va_...
functions
int unit_deserialize(Unit *u, FILE *f, FDSet *fds) { ExecRuntime **rt = NULL; size_t offset; int r; assert(u); assert(f); assert(fds); offset = UNIT_VTABLE(u)->exec_runtime_offset; if (offset > 0) rt = (ExecRuntime**) ((uint8_t*) u + offs...
functions
int unit_add_node_link(Unit *u, const char *what, bool wants) { Unit *device; _cleanup_free_ char *e = NULL; int r; assert(u); /* Adds in links to the device node that this unit is based on */ if (isempty(what)) return 0; if (!is_device_path(wha...
functions
int unit_coldplug(Unit *u) { int r = 0, q = 0; assert(u); /* Make sure we don't enter a loop, when coldplugging * recursively. */ if (u->coldplugged) return 0; u->coldplugged = true; if (UNIT_VTABLE(u)->coldplug) r = UNIT_VTABL...