qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1/2] block: add dirty flag status to qemu-img


From: Kevin Wolf
Subject: Re: [Qemu-devel] [PATCH 1/2] block: add dirty flag status to qemu-img
Date: Wed, 11 Jan 2012 15:47:32 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111115 Thunderbird/8.0

Am 11.01.2012 15:35, schrieb Stefan Hajnoczi:
> On Sat, Dec 31, 2011 at 9:06 AM, Dong Xu Wang
> <address@hidden> wrote:
>> +int bdrv_is_dirty(BlockDriverState *bs)
> 
> bool would be nicer instead of int.  Traditionally we used int but C99
> has been around for a long time now and it's more appropriate.
> 
>> diff --git a/qemu-img.c b/qemu-img.c
>> index 01cc0d3..a79c274 100644
>> --- a/qemu-img.c
>> +++ b/qemu-img.c
>> @@ -1153,6 +1153,9 @@ static int img_info(int argc, char **argv)
>>     if (bdrv_is_encrypted(bs)) {
>>         printf("encrypted: yes\n");
>>     }
>> +    if (bdrv_is_dirty(bs)) {
>> +        printf("dirty,need check: yes\n");
>> +    }
> 
> I suggest avoiding the comma and just saying "needs check: yes\n".

In fact I would reverse the logic and make it something like "cleanly
shut down: no", it will better describe the situation when the VM is
still running. Same for the function names, "dirty" could mean anything.

Kevin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]