diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-02-01 03:33:24 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-02-01 03:33:24 +0100 |
commit | ea4309869e75497ba6a97c540646cb66a157a4d9 (patch) | |
tree | 8a00d7d42718d74e1b88ecb6e074ce9eb1b8a3fd /job.c | |
parent | b9f880f4f4903f5dd8198fc1e2e920a9850ac86e (diff) |
add basic (and not very useful) D-Bus support
Diffstat (limited to 'job.c')
-rw-r--r-- | job.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -463,6 +463,17 @@ void job_schedule_run(Job *j) { j->in_run_queue = true; } +char *job_dbus_path(Job *j) { + char *p; + + assert(j); + + if (asprintf(&p, "/org/freedesktop/systemd1/job/%lu", (unsigned long) j->id) < 0) + return NULL; + + return p; +} + static const char* const job_state_table[_JOB_STATE_MAX] = { [JOB_WAITING] = "waiting", [JOB_RUNNING] = "running" |