1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-28 07:21:32 +03:00

job: add two explanatory comments

This commit is contained in:
Lennart Poettering 2018-11-14 11:01:28 +01:00
parent a69b3872ac
commit 0e2b4a822e

View File

@ -563,7 +563,7 @@ static void job_log_begin_status_message(Unit *u, uint32_t job_id, JobType t) {
if (!IN_SET(t, JOB_START, JOB_STOP, JOB_RELOAD)) if (!IN_SET(t, JOB_START, JOB_STOP, JOB_RELOAD))
return; return;
if (log_on_console()) if (log_on_console()) /* Skip this if it would only go on the console anyway */
return; return;
/* We log status messages for all units and all operations. */ /* We log status messages for all units and all operations. */
@ -643,8 +643,9 @@ static int job_perform_on_unit(Job **j) {
assert_not_reached("Invalid job type"); assert_not_reached("Invalid job type");
} }
/* Log if the job still exists and the start/stop/reload function /* Log if the job still exists and the start/stop/reload function actually did something. Note that this means
* actually did something. */ * for units for which there's no 'activating' phase (i.e. because we transition directly from 'inactive' to
* 'active') we'll possibly skip the "Starting..." message. */
*j = manager_get_job(m, id); *j = manager_get_job(m, id);
if (*j && r > 0) if (*j && r > 0)
job_emit_begin_status_message(u, id, t); job_emit_begin_status_message(u, id, t);