chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ptyfwd: Don't set the output prop of stdin, nor the input props of stdout.
[elogind.git]
/
src
/
core
/
unit.c
diff --git
a/src/core/unit.c
b/src/core/unit.c
index 31d5f113f7ea2ae7c7ea071cd6fe345c8342695c..6458c7f5707c74a6e9914ed023dcecc8ef3d90cb 100644
(file)
--- a/
src/core/unit.c
+++ b/
src/core/unit.c
@@
-53,14
+53,15
@@
const UnitVTable * const unit_vtable[_UNIT_TYPE_MAX] = {
[UNIT_SERVICE] = &service_vtable,
const UnitVTable * const unit_vtable[_UNIT_TYPE_MAX] = {
[UNIT_SERVICE] = &service_vtable,
- [UNIT_TIMER] = &timer_vtable,
[UNIT_SOCKET] = &socket_vtable,
[UNIT_SOCKET] = &socket_vtable,
+ [UNIT_BUSNAME] = &busname_vtable,
[UNIT_TARGET] = &target_vtable,
[UNIT_TARGET] = &target_vtable,
+ [UNIT_SNAPSHOT] = &snapshot_vtable,
[UNIT_DEVICE] = &device_vtable,
[UNIT_MOUNT] = &mount_vtable,
[UNIT_AUTOMOUNT] = &automount_vtable,
[UNIT_DEVICE] = &device_vtable,
[UNIT_MOUNT] = &mount_vtable,
[UNIT_AUTOMOUNT] = &automount_vtable,
- [UNIT_SNAPSHOT] = &snapshot_vtable,
[UNIT_SWAP] = &swap_vtable,
[UNIT_SWAP] = &swap_vtable,
+ [UNIT_TIMER] = &timer_vtable,
[UNIT_PATH] = &path_vtable,
[UNIT_SLICE] = &slice_vtable,
[UNIT_SCOPE] = &scope_vtable
[UNIT_PATH] = &path_vtable,
[UNIT_SLICE] = &slice_vtable,
[UNIT_SCOPE] = &scope_vtable
@@
-1300,8
+1301,11
@@
int unit_reload(Unit *u) {
if (state == UNIT_RELOADING)
return -EALREADY;
if (state == UNIT_RELOADING)
return -EALREADY;
- if (state != UNIT_ACTIVE)
+ if (state != UNIT_ACTIVE) {
+ log_warning_unit(u->id, "Unit %s cannot be reloaded because it is inactive.",
+ u->id);
return -ENOEXEC;
return -ENOEXEC;
+ }
following = unit_following(u);
if (following) {
following = unit_following(u);
if (following) {
@@
-1844,7
+1848,7
@@
static const char *resolve_template(Unit *u, const char *name, const char*path,
assert(p);
if (!name)
assert(p);
if (!name)
- name =
path_get_file_
name(path);
+ name =
base
name(path);
if (!unit_name_is_template(name)) {
*p = NULL;
if (!unit_name_is_template(name)) {
*p = NULL;
@@
-2611,7
+2615,7
@@
UnitFileState unit_get_unit_file_state(Unit *u) {
if (u->unit_file_state < 0 && u->fragment_path)
u->unit_file_state = unit_file_get_state(
u->manager->running_as == SYSTEMD_SYSTEM ? UNIT_FILE_SYSTEM : UNIT_FILE_USER,
if (u->unit_file_state < 0 && u->fragment_path)
u->unit_file_state = unit_file_get_state(
u->manager->running_as == SYSTEMD_SYSTEM ? UNIT_FILE_SYSTEM : UNIT_FILE_USER,
- NULL,
path_get_file_
name(u->fragment_path));
+ NULL,
base
name(u->fragment_path));
return u->unit_file_state;
}
return u->unit_file_state;
}