Compare commits
4 Commits
e6d6645517
...
09ee387e08
Author | SHA1 | Date |
---|---|---|
Michael Tretter | 09ee387e08 | |
Zbigniew Jędrzejewski-Szmek | 228ae7ff11 | |
Franck Bui | d336ba9fa6 | |
Franck Bui | 9b88bb5023 |
|
@ -112,6 +112,12 @@ These configuration snippets shall be Unix-style text files (i.e. line separatio
|
||||||
* `devicetree` refers to the binary device tree to use when executing the
|
* `devicetree` refers to the binary device tree to use when executing the
|
||||||
kernel. This also shall be a path relative to the `$BOOT` directory. This
|
kernel. This also shall be a path relative to the `$BOOT` directory. This
|
||||||
key is optional. Example: `6a9857a393724b7a981ebb5b8495b9ea/3.8.0-2.fc19.armv7hl/tegra20-paz00.dtb`.
|
key is optional. Example: `6a9857a393724b7a981ebb5b8495b9ea/3.8.0-2.fc19.armv7hl/tegra20-paz00.dtb`.
|
||||||
|
* `devicetree-overlay` refers to a list of device tree overlays that should be
|
||||||
|
applied by the boot loader. Multiple overlays are separated by spaces and
|
||||||
|
applied in the same order as they are listed. This key is optional but depends
|
||||||
|
on the `devicetree` key. Example:
|
||||||
|
`/6a9857a393724b7a981ebb5b8495b9ea/overlays/overlay_A.dtbo
|
||||||
|
/6a9857a393724b7a981ebb5b8495b9ea/overlays/overlay_B.dtbo`
|
||||||
* `architecture` refers to the architecture this entry is defined for. The argument should be an architecture identifier, using the architecture vocabulary defined by the EFI specification (i.e. `IA32`, `x64`, `IA64`, `ARM`, `AA64`, …). If specified and this does not match (case insensitively) the local system architecture this entry should be hidden.
|
* `architecture` refers to the architecture this entry is defined for. The argument should be an architecture identifier, using the architecture vocabulary defined by the EFI specification (i.e. `IA32`, `x64`, `IA64`, `ARM`, `AA64`, …). If specified and this does not match (case insensitively) the local system architecture this entry should be hidden.
|
||||||
|
|
||||||
Each configuration drop-in snippet must include at least a `linux` or an `efi` key and is otherwise not valid. Here's an example for a complete drop-in file:
|
Each configuration drop-in snippet must include at least a `linux` or an `efi` key and is otherwise not valid. Here's an example for a complete drop-in file:
|
||||||
|
|
|
@ -361,7 +361,7 @@ static int mount_add_device_dependencies(Mount *m) {
|
||||||
/* We always use 'what' from /proc/self/mountinfo if mounted */
|
/* We always use 'what' from /proc/self/mountinfo if mounted */
|
||||||
mask = m->from_proc_self_mountinfo ? UNIT_DEPENDENCY_MOUNTINFO_IMPLICIT : UNIT_DEPENDENCY_FILE;
|
mask = m->from_proc_self_mountinfo ? UNIT_DEPENDENCY_MOUNTINFO_IMPLICIT : UNIT_DEPENDENCY_FILE;
|
||||||
|
|
||||||
r = unit_add_node_dependency(UNIT(m), p->what, false, dep, mask);
|
r = unit_add_node_dependency(UNIT(m), p->what, dep, mask);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return r;
|
return r;
|
||||||
|
|
||||||
|
|
|
@ -294,7 +294,7 @@ static int socket_add_device_dependencies(Socket *s) {
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
t = strjoina("/sys/subsystem/net/devices/", s->bind_to_device);
|
t = strjoina("/sys/subsystem/net/devices/", s->bind_to_device);
|
||||||
return unit_add_node_dependency(UNIT(s), t, false, UNIT_BINDS_TO, UNIT_DEPENDENCY_FILE);
|
return unit_add_node_dependency(UNIT(s), t, UNIT_BINDS_TO, UNIT_DEPENDENCY_FILE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int socket_add_default_dependencies(Socket *s) {
|
static int socket_add_default_dependencies(Socket *s) {
|
||||||
|
|
|
@ -197,12 +197,11 @@ static int swap_add_device_dependencies(Swap *s) {
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (is_device_path(s->what))
|
if (is_device_path(s->what))
|
||||||
return unit_add_node_dependency(UNIT(s), s->what, MANAGER_IS_SYSTEM(UNIT(s)->manager), UNIT_BINDS_TO, UNIT_DEPENDENCY_FILE);
|
return unit_add_node_dependency(UNIT(s), s->what, UNIT_BINDS_TO, UNIT_DEPENDENCY_FILE);
|
||||||
else
|
|
||||||
/* File based swap devices need to be ordered after
|
/* File based swap devices need to be ordered after systemd-remount-fs.service,
|
||||||
* systemd-remount-fs.service, since they might need a
|
* since they might need a writable file system. */
|
||||||
* writable file system. */
|
return unit_add_dependency_by_name(UNIT(s), UNIT_AFTER, SPECIAL_REMOUNT_FS_SERVICE, true, UNIT_DEPENDENCY_FILE);
|
||||||
return unit_add_dependency_by_name(UNIT(s), UNIT_AFTER, SPECIAL_REMOUNT_FS_SERVICE, true, UNIT_DEPENDENCY_FILE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int swap_add_default_dependencies(Swap *s) {
|
static int swap_add_default_dependencies(Swap *s) {
|
||||||
|
|
|
@ -3832,7 +3832,7 @@ int unit_deserialize_skip(FILE *f) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int unit_add_node_dependency(Unit *u, const char *what, bool wants, UnitDependency dep, UnitDependencyMask mask) {
|
int unit_add_node_dependency(Unit *u, const char *what, UnitDependency dep, UnitDependencyMask mask) {
|
||||||
Unit *device;
|
Unit *device;
|
||||||
_cleanup_free_ char *e = NULL;
|
_cleanup_free_ char *e = NULL;
|
||||||
int r;
|
int r;
|
||||||
|
@ -3862,19 +3862,9 @@ int unit_add_node_dependency(Unit *u, const char *what, bool wants, UnitDependen
|
||||||
if (dep == UNIT_REQUIRES && device_shall_be_bound_by(device, u))
|
if (dep == UNIT_REQUIRES && device_shall_be_bound_by(device, u))
|
||||||
dep = UNIT_BINDS_TO;
|
dep = UNIT_BINDS_TO;
|
||||||
|
|
||||||
r = unit_add_two_dependencies(u, UNIT_AFTER,
|
return unit_add_two_dependencies(u, UNIT_AFTER,
|
||||||
MANAGER_IS_SYSTEM(u->manager) ? dep : UNIT_WANTS,
|
MANAGER_IS_SYSTEM(u->manager) ? dep : UNIT_WANTS,
|
||||||
device, true, mask);
|
device, true, mask);
|
||||||
if (r < 0)
|
|
||||||
return r;
|
|
||||||
|
|
||||||
if (wants) {
|
|
||||||
r = unit_add_dependency(device, UNIT_WANTS, u, false, mask);
|
|
||||||
if (r < 0)
|
|
||||||
return r;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int unit_coldplug(Unit *u) {
|
int unit_coldplug(Unit *u) {
|
||||||
|
|
|
@ -733,7 +733,7 @@ int unit_serialize(Unit *u, FILE *f, FDSet *fds, bool serialize_jobs);
|
||||||
int unit_deserialize(Unit *u, FILE *f, FDSet *fds);
|
int unit_deserialize(Unit *u, FILE *f, FDSet *fds);
|
||||||
int unit_deserialize_skip(FILE *f);
|
int unit_deserialize_skip(FILE *f);
|
||||||
|
|
||||||
int unit_add_node_dependency(Unit *u, const char *what, bool wants, UnitDependency d, UnitDependencyMask mask);
|
int unit_add_node_dependency(Unit *u, const char *what, UnitDependency d, UnitDependencyMask mask);
|
||||||
|
|
||||||
int unit_coldplug(Unit *u);
|
int unit_coldplug(Unit *u);
|
||||||
void unit_catchup(Unit *u);
|
void unit_catchup(Unit *u);
|
||||||
|
|
Loading…
Reference in New Issue