X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fmanager.c;h=1fe8936cd327608b1fc6e3bc720e22dcc862f6cc;hb=d37fb98bbcf85115a03664437ae02aa95f6af4bc;hp=26a631e9d7fc0db7807d8a18211da0a353cb1e0d;hpb=00dc5d769ac4a4019d6b6fe22e8383ec8b030a96;p=elogind.git diff --git a/src/manager.c b/src/manager.c index 26a631e9d..1fe8936cd 100644 --- a/src/manager.c +++ b/src/manager.c @@ -1400,7 +1400,7 @@ static int transaction_add_job_and_dependencies( if (unit->meta.load_state != UNIT_LOADED && unit->meta.load_state != UNIT_ERROR && - unit->meta.load_state != UNIT_BANNED) { + unit->meta.load_state != UNIT_MASKED) { dbus_set_error(e, BUS_ERROR_LOAD_FAILED, "Unit %s is not loaded properly.", unit->meta.id); return -EINVAL; } @@ -1414,8 +1414,8 @@ static int transaction_add_job_and_dependencies( return -EINVAL; } - if (type != JOB_STOP && unit->meta.load_state == UNIT_BANNED) { - dbus_set_error(e, BUS_ERROR_BANNED, "Unit %s is banned.", unit->meta.id); + if (type != JOB_STOP && unit->meta.load_state == UNIT_MASKED) { + dbus_set_error(e, BUS_ERROR_MASKED, "Unit %s is masked.", unit->meta.id); return -EINVAL; } @@ -1641,7 +1641,7 @@ int manager_load_unit_prepare(Manager *m, const char *name, const char *path, DB if (!name) name = file_name_from_path(path); - if (!unit_name_is_valid(name)) { + if (!unit_name_is_valid(name, false)) { dbus_set_error(e, BUS_ERROR_INVALID_NAME, "Unit name %s is not valid.", name); return -EINVAL; } @@ -2217,6 +2217,9 @@ int manager_loop(Manager *m) { if (manager_dispatch_dbus_queue(m) > 0) continue; + if (swap_dispatch_reload(m) > 0) + continue; + if ((n = epoll_wait(m->epoll_fd, &event, 1, -1)) < 0) { if (errno == EINTR)