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".