Re: [Qemu-devel] [PATCH 04/47] block: add block_job_query

2012-08-02 Thread Jeff Cody
On 07/31/2012 04:50 AM, Paolo Bonzini wrote: > Il 31/07/2012 10:47, Kevin Wolf ha scritto: >> Why did you convert the initialisation to separate statement? If you >> really want to do this, I think using g_new0 would be safer now, but I >> actually like compound literals better. >>

Re: [Qemu-devel] [PATCH 04/47] block: add block_job_query

2012-07-31 Thread Paolo Bonzini
Il 31/07/2012 10:47, Kevin Wolf ha scritto: >>> >> Why did you convert the initialisation to separate statement? If you >>> >> really want to do this, I think using g_new0 would be safer now, but I >>> >> actually like compound literals better. >> > >> > Later on I will have some more initializati

Re: [Qemu-devel] [PATCH 04/47] block: add block_job_query

2012-07-31 Thread Kevin Wolf
Am 30.07.2012 17:05, schrieb Paolo Bonzini: > Il 30/07/2012 16:47, Kevin Wolf ha scritto: +BlockJobInfo *block_job_query(BlockJob *job) +{ +BlockJobInfo *info = g_new(BlockJobInfo, 1); +info->type = g_strdup(job->job_type->job_type); +info->device = g_strdup(b

Re: [Qemu-devel] [PATCH 04/47] block: add block_job_query

2012-07-30 Thread Paolo Bonzini
Il 30/07/2012 16:47, Kevin Wolf ha scritto: >> > +BlockJobInfo *block_job_query(BlockJob *job) >> > +{ >> > +BlockJobInfo *info = g_new(BlockJobInfo, 1); >> > +info->type = g_strdup(job->job_type->job_type); >> > +info->device = g_strdup(bdrv_get_device_name(job->bs)); >> > +info-

Re: [Qemu-devel] [PATCH 04/47] block: add block_job_query

2012-07-30 Thread Kevin Wolf
Am 24.07.2012 13:03, schrieb Paolo Bonzini: > Extract it out of the implementation of query-block-jobs. > > Signed-off-by: Paolo Bonzini > --- > blockdev.c | 15 ++- > blockjob.c | 11 +++ > blockjob.h |8 > 3 files changed, 21 insertions(+), 13 deletions(-)

[Qemu-devel] [PATCH 04/47] block: add block_job_query

2012-07-24 Thread Paolo Bonzini
Extract it out of the implementation of query-block-jobs. Signed-off-by: Paolo Bonzini --- blockdev.c | 15 ++- blockjob.c | 11 +++ blockjob.h |8 3 files changed, 21 insertions(+), 13 deletions(-) diff --git a/blockdev.c b/blockdev.c index e066f8f..dc099f9