diff options
author | Kevin Wolf <kwolf@redhat.com> | 2009-05-28 16:07:07 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-06-16 15:18:36 -0500 |
commit | ed6ccf0f518aea8fab18815c8b18b2819524e4c2 (patch) | |
tree | bdefff9a932778670b3467431b767a0395cdd560 /block/qcow2.h | |
parent | c142442b06c51df60d000145d18af60ae5f0ac1c (diff) |
qcow2: Rename global functions
The qcow2 source is now split into several more manageable files. During the
conversion quite some functions that were static before needed to be changed to
be global to make the source compile again.
We were lucky enough not to get name conflicts with these additional global
names, but they are not nice. This patch adds a qcow2_ prefix to all of the
global functions in qcow2.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'block/qcow2.h')
-rw-r--r-- | block/qcow2.h | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/block/qcow2.h b/block/qcow2.h index 397f21d3b3..d734003068 100644 --- a/block/qcow2.h +++ b/block/qcow2.h @@ -148,56 +148,56 @@ static inline int64_t align_offset(int64_t offset, int n) // FIXME Need qcow2_ prefix to global functions /* qcow2.c functions */ -void l2_cache_reset(BlockDriverState *bs); -int backing_read1(BlockDriverState *bs, +int qcow2_backing_read1(BlockDriverState *bs, int64_t sector_num, uint8_t *buf, int nb_sectors); /* qcow2-refcount.c functions */ -int refcount_init(BlockDriverState *bs); -void refcount_close(BlockDriverState *bs); +int qcow2_refcount_init(BlockDriverState *bs); +void qcow2_refcount_close(BlockDriverState *bs); -int64_t alloc_clusters(BlockDriverState *bs, int64_t size); -int64_t alloc_bytes(BlockDriverState *bs, int size); -void free_clusters(BlockDriverState *bs, +int64_t qcow2_alloc_clusters(BlockDriverState *bs, int64_t size); +int64_t qcow2_alloc_bytes(BlockDriverState *bs, int size); +void qcow2_free_clusters(BlockDriverState *bs, int64_t offset, int64_t size); -void free_any_clusters(BlockDriverState *bs, +void qcow2_free_any_clusters(BlockDriverState *bs, uint64_t cluster_offset, int nb_clusters); -void create_refcount_update(QCowCreateState *s, int64_t offset, int64_t size); -int update_snapshot_refcount(BlockDriverState *bs, - int64_t l1_table_offset, - int l1_size, - int addend); +void qcow2_create_refcount_update(QCowCreateState *s, int64_t offset, + int64_t size); +int qcow2_update_snapshot_refcount(BlockDriverState *bs, + int64_t l1_table_offset, int l1_size, int addend); -int check_refcounts(BlockDriverState *bs); +int qcow2_check_refcounts(BlockDriverState *bs); /* qcow2-cluster.c functions */ -int grow_l1_table(BlockDriverState *bs, int min_size); -int decompress_cluster(BDRVQcowState *s, uint64_t cluster_offset); -void encrypt_sectors(BDRVQcowState *s, int64_t sector_num, +int qcow2_grow_l1_table(BlockDriverState *bs, int min_size); +void qcow2_l2_cache_reset(BlockDriverState *bs); +int qcow2_decompress_cluster(BDRVQcowState *s, uint64_t cluster_offset); +void qcow2_encrypt_sectors(BDRVQcowState *s, int64_t sector_num, uint8_t *out_buf, const uint8_t *in_buf, int nb_sectors, int enc, const AES_KEY *key); -uint64_t get_cluster_offset(BlockDriverState *bs, uint64_t offset, int *num); -uint64_t alloc_cluster_offset(BlockDriverState *bs, +uint64_t qcow2_get_cluster_offset(BlockDriverState *bs, uint64_t offset, + int *num); +uint64_t qcow2_alloc_cluster_offset(BlockDriverState *bs, uint64_t offset, int n_start, int n_end, int *num, QCowL2Meta *m); -uint64_t alloc_compressed_cluster_offset(BlockDriverState *bs, +uint64_t qcow2_alloc_compressed_cluster_offset(BlockDriverState *bs, uint64_t offset, int compressed_size); -int alloc_cluster_link_l2(BlockDriverState *bs, uint64_t cluster_offset, +int qcow2_alloc_cluster_link_l2(BlockDriverState *bs, uint64_t cluster_offset, QCowL2Meta *m); /* qcow2-snapshot.c functions */ -int qcow_snapshot_create(BlockDriverState *bs, QEMUSnapshotInfo *sn_info); -int qcow_snapshot_goto(BlockDriverState *bs, const char *snapshot_id); -int qcow_snapshot_delete(BlockDriverState *bs, const char *snapshot_id); -int qcow_snapshot_list(BlockDriverState *bs, QEMUSnapshotInfo **psn_tab); +int qcow2_snapshot_create(BlockDriverState *bs, QEMUSnapshotInfo *sn_info); +int qcow2_snapshot_goto(BlockDriverState *bs, const char *snapshot_id); +int qcow2_snapshot_delete(BlockDriverState *bs, const char *snapshot_id); +int qcow2_snapshot_list(BlockDriverState *bs, QEMUSnapshotInfo **psn_tab); -void qcow_free_snapshots(BlockDriverState *bs); -int qcow_read_snapshots(BlockDriverState *bs); +void qcow2_free_snapshots(BlockDriverState *bs); +int qcow2_read_snapshots(BlockDriverState *bs); #endif |