« Previous | Next » 

Revision 1c46efaa

ID1c46efaa0a175e468772405385ca26a1e35dd94c

Added by Kevin Wolf almost 14 years ago

qcow2: Allow qcow2_get_cluster_offset to return errors

qcow2_get_cluster_offset() looks up a given virtual disk offset and returns the
offset of the corresponding cluster in the image file. Errors (e.g. L2 table
can't be read) are currenctly indicated by a return value of 0, which is
unfortuately the same as for any unallocated cluster. So in effect we can't
check for errors.

This makes the old return value a by-reference parameter and returns the usual
0/-errno error code.

Signed-off-by: Kevin Wolf <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences