On 05/18/2018 08:21 AM, Kevin Wolf wrote:
This adds a QMP event that is emitted whenever a job transitions from
one status to another.
Signed-off-by: Kevin Wolf <kw...@redhat.com>
---
qapi/job.json | 14 ++++
job.c | 10 +++
@@ -157,6 +158,11 @@ static int job_txn_apply(JobTxn *txn, int fn(Job *), bool
lock)
return rc;
}
+static bool job_is_internal(Job *job)
+{
+ return (job->id == NULL);
The () are not necessary. In fact, you could use !!job->id for less
typing, or even rely on the compiler to auto-convert a pointer into bool
by just 'return job->id' (although the latter feels a bit too terse to me).
Style is minor, so
Reviewed-by: Eric Blake <ebl...@redhat.com>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org