Am 11.01.2012 15:35, schrieb Stefan Hajnoczi:
> On Sat, Dec 31, 2011 at 9:06 AM, Dong Xu Wang
> <wdon...@linux.vnet.ibm.com> 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