Am 14.06.2012 14:58, schrieb Stefan Hajnoczi: > This new command sets feature bits in the image file header: > > qcow2.py set-feature-bit incompatible|compatible|autoclear <bit> > > The bit number must be in the range [0, 64). > > Signed-off-by: Stefan Hajnoczi <stefa...@linux.vnet.ibm.com> > --- > tests/qemu-iotests/qcow2.py | 23 +++++++++++++++++++++++ > 1 file changed, 23 insertions(+) > > diff --git a/tests/qemu-iotests/qcow2.py b/tests/qemu-iotests/qcow2.py > index e27196a..97f3770 100755 > --- a/tests/qemu-iotests/qcow2.py > +++ b/tests/qemu-iotests/qcow2.py > @@ -181,10 +181,33 @@ def cmd_del_header_ext(fd, magic): > > h.update(fd) > > +def cmd_set_feature_bit(fd, group, bit): > + try: > + bit = int(bit, 0) > + if bit < 0 or bit >= 64: > + raise ValueError > + except: > + print "'%s' is not a valid bit number in range [0, 64)" % bit
Heh, open intervals on integers are nice. ;-) Thanks, applied all to the block branch. Kevin