]> rtime.felk.cvut.cz Git - lisovros/qemu_apohw.git/commitdiff
qcow2: Correct comment for realloc_refcount_block()
authorMax Reitz <mreitz@redhat.com>
Mon, 17 Mar 2014 22:04:51 +0000 (23:04 +0100)
committerKevin Wolf <kwolf@redhat.com>
Wed, 19 Mar 2014 08:39:41 +0000 (09:39 +0100)
Contrary to the comment describing this function's behavior, it does not
return 0 on success, but rather the offset of the newly allocated
cluster. This patch adjusts the comment accordingly to reflect the
actual behavior.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/qcow2-refcount.c

index 6151148507b13135ebf469929b14ef55a0630ee1..3f2ed084661ea8142a81329d3b5425c6f1915b1f 100644 (file)
@@ -1383,7 +1383,7 @@ static int write_reftable_entry(BlockDriverState *bs, int rt_index)
  * does _not_ decrement the reference count for the currently occupied cluster.
  *
  * This function prints an informative message to stderr on error (and returns
- * -errno); on success, 0 is returned.
+ * -errno); on success, the offset of the newly allocated cluster is returned.
  */
 static int64_t realloc_refcount_block(BlockDriverState *bs, int reftable_index,
                                       uint64_t offset)