[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 08/14] Remove unused argument for qcow2_encrypt_sect
From: |
Jes . Sorensen |
Subject: |
[Qemu-devel] [PATCH 08/14] Remove unused argument for qcow2_encrypt_sectors() |
Date: |
Mon, 30 Aug 2010 17:59:14 +0200 |
From: Jes Sorensen <address@hidden>
Signed-off-by: Jes Sorensen <address@hidden>
---
block/qcow2-cluster.c | 17 ++++++++---------
block/qcow2.c | 10 +++++-----
block/qcow2.h | 7 +++----
3 files changed, 16 insertions(+), 18 deletions(-)
diff --git a/block/qcow2-cluster.c b/block/qcow2-cluster.c
index 166922f..14aaf7a 100644
--- a/block/qcow2-cluster.c
+++ b/block/qcow2-cluster.c
@@ -319,9 +319,8 @@ static int count_contiguous_free_clusters(uint64_t
nb_clusters, uint64_t *l2_tab
/* The crypt function is compatible with the linux cryptoloop
algorithm for < 4 GB images. NOTE: out_buf == in_buf is
supported */
-void qcow2_encrypt_sectors(BDRVQcowState *s, int64_t sector_num,
- uint8_t *out_buf, const uint8_t *in_buf,
- int nb_sectors, int enc,
+void qcow2_encrypt_sectors(int64_t sector_num, uint8_t *out_buf,
+ const uint8_t *in_buf, int nb_sectors, int enc,
const AES_KEY *key)
{
union {
@@ -382,8 +381,8 @@ static int qcow_read(BlockDriverState *bs, int64_t
sector_num,
if (ret != n * 512)
return -1;
if (s->crypt_method) {
- qcow2_encrypt_sectors(s, sector_num, buf, buf, n, 0,
- &s->aes_decrypt_key);
+ qcow2_encrypt_sectors(sector_num, buf, buf, n, 0,
+ &s->aes_decrypt_key);
}
}
nb_sectors -= n;
@@ -407,10 +406,10 @@ static int copy_sectors(BlockDriverState *bs, uint64_t
start_sect,
if (ret < 0)
return ret;
if (s->crypt_method) {
- qcow2_encrypt_sectors(s, start_sect + n_start,
- s->cluster_data,
- s->cluster_data, n, 1,
- &s->aes_encrypt_key);
+ qcow2_encrypt_sectors(start_sect + n_start,
+ s->cluster_data,
+ s->cluster_data, n, 1,
+ &s->aes_encrypt_key);
}
BLKDBG_EVENT(bs->file, BLKDBG_COW_WRITE);
ret = bdrv_write_sync(bs->file, (cluster_offset >> 9) + n_start,
diff --git a/block/qcow2.c b/block/qcow2.c
index a53014d..e7ba7b4 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -397,9 +397,9 @@ static void qcow_aio_read_cb(void *opaque, int ret)
/* nothing to do */
} else {
if (s->crypt_method) {
- qcow2_encrypt_sectors(s, acb->sector_num, acb->buf, acb->buf,
- acb->cur_nr_sectors, 0,
- &s->aes_decrypt_key);
+ qcow2_encrypt_sectors(acb->sector_num, acb->buf, acb->buf,
+ acb->cur_nr_sectors, 0,
+ &s->aes_decrypt_key);
}
}
@@ -609,8 +609,8 @@ static void qcow_aio_write_cb(void *opaque, int ret)
acb->cluster_data = qemu_mallocz(QCOW_MAX_CRYPT_CLUSTERS *
s->cluster_size);
}
- qcow2_encrypt_sectors(s, acb->sector_num, acb->cluster_data, acb->buf,
- acb->cur_nr_sectors, 1, &s->aes_encrypt_key);
+ qcow2_encrypt_sectors(acb->sector_num, acb->cluster_data, acb->buf,
+ acb->cur_nr_sectors, 1, &s->aes_encrypt_key);
src_buf = acb->cluster_data;
} else {
src_buf = acb->buf;
diff --git a/block/qcow2.h b/block/qcow2.h
index 3ff162e..477b0f9 100644
--- a/block/qcow2.h
+++ b/block/qcow2.h
@@ -191,10 +191,9 @@ int qcow2_check_refcounts(BlockDriverState *bs,
BdrvCheckResult *res);
int qcow2_grow_l1_table(BlockDriverState *bs, int min_size);
void qcow2_l2_cache_reset(BlockDriverState *bs);
int qcow2_decompress_cluster(BlockDriverState *bs, 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);
+void qcow2_encrypt_sectors(int64_t sector_num, uint8_t *out_buf,
+ const uint8_t *in_buf, int nb_sectors, int enc,
+ const AES_KEY *key);
int qcow2_get_cluster_offset(BlockDriverState *bs, uint64_t offset,
int *num, uint64_t *cluster_offset);
--
1.7.2.2
- [Qemu-devel] Re: [PATCH 05/14] Remove unused argument for check_for_block_signature(), (continued)
- [Qemu-devel] [PATCH 11/14] Remove unused function arguments, Jes . Sorensen, 2010/08/30
- [Qemu-devel] [PATCH 10/14] Zero json struct with memset() instea of = {} to keep compiler happy., Jes . Sorensen, 2010/08/30
- [Qemu-devel] [PATCH 09/14] Remove unused arguments for add_aio_request() and free_aio_req(), Jes . Sorensen, 2010/08/30
- [Qemu-devel] [PATCH 01/14] Remove unused argument for nbd_client(), Jes . Sorensen, 2010/08/30
- [Qemu-devel] [PATCH 03/14] Fix repeated typo: was "end if list" instead of "end of list", Jes . Sorensen, 2010/08/30
- [Qemu-devel] [PATCH 12/14] size_t is unsigned, change to ssize_t to handle errors from tight_compress_data(), Jes . Sorensen, 2010/08/30
- [Qemu-devel] [PATCH 07/14] Remove unused argument for get_whole_cluster(), Jes . Sorensen, 2010/08/30
- [Qemu-devel] [PATCH 06/14] Remove unused argument for encrypt_sectors(), Jes . Sorensen, 2010/08/30
- [Qemu-devel] [PATCH 04/14] Zero initialize timespec struct explicitly, Jes . Sorensen, 2010/08/30
- [Qemu-devel] [PATCH 08/14] Remove unused argument for qcow2_encrypt_sectors(),
Jes . Sorensen <=
- [Qemu-devel] [PATCH 02/14] Respect return value from nbd_client(), Jes . Sorensen, 2010/08/30
- [Qemu-devel] [PATCH 14/14] load_multiboot(): get_image_size() returns int, Jes . Sorensen, 2010/08/30
- [Qemu-devel] Re: [PATCH 00/14] gcc extra warning fixes v2, Kevin Wolf, 2010/08/31