[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 06/14] Remove unused argument for encrypt_sectors()
From: |
Jes . Sorensen |
Subject: |
[Qemu-devel] [PATCH 06/14] Remove unused argument for encrypt_sectors() |
Date: |
Mon, 30 Aug 2010 17:35:39 +0200 |
From: Jes Sorensen <address@hidden>
Signed-off-by: Jes Sorensen <address@hidden>
---
block/qcow.c | 13 ++++++-------
1 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/block/qcow.c b/block/qcow.c
index 816103d..c4d8cb3 100644
--- a/block/qcow.c
+++ b/block/qcow.c
@@ -214,9 +214,8 @@ static int qcow_set_key(BlockDriverState *bs, const char
*key)
/* The crypt function is compatible with the linux cryptoloop
algorithm for < 4 GB images. NOTE: out_buf == in_buf is
supported */
-static void encrypt_sectors(BDRVQcowState *s, int64_t sector_num,
- uint8_t *out_buf, const uint8_t *in_buf,
- int nb_sectors, int enc,
+static void 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 {
@@ -351,7 +350,7 @@ static uint64_t get_cluster_offset(BlockDriverState *bs,
memset(s->cluster_data + 512, 0x00, 512);
for(i = 0; i < s->cluster_sectors; i++) {
if (i < n_start || i >= n_end) {
- encrypt_sectors(s, start_sect + i,
+ encrypt_sectors(start_sect + i,
s->cluster_data,
s->cluster_data + 512, 1, 1,
&s->aes_encrypt_key);
@@ -474,7 +473,7 @@ static int qcow_read(BlockDriverState *bs, int64_t
sector_num,
if (ret != n * 512)
return -1;
if (s->crypt_method) {
- encrypt_sectors(s, sector_num, buf, buf, n, 0,
+ encrypt_sectors(sector_num, buf, buf, n, 0,
&s->aes_decrypt_key);
}
}
@@ -558,7 +557,7 @@ static void qcow_aio_read_cb(void *opaque, int ret)
/* nothing to do */
} else {
if (s->crypt_method) {
- encrypt_sectors(s, acb->sector_num, acb->buf, acb->buf,
+ encrypt_sectors(acb->sector_num, acb->buf, acb->buf,
acb->n, 0,
&s->aes_decrypt_key);
}
@@ -687,7 +686,7 @@ static void qcow_aio_write_cb(void *opaque, int ret)
goto done;
}
}
- encrypt_sectors(s, acb->sector_num, acb->cluster_data, acb->buf,
+ encrypt_sectors(acb->sector_num, acb->cluster_data, acb->buf,
acb->n, 1, &s->aes_encrypt_key);
src_buf = acb->cluster_data;
} else {
--
1.7.2.2
- [Qemu-devel] [PATCH 00/14] gcc extra warning fixes, Jes . Sorensen, 2010/08/30
- [Qemu-devel] [PATCH 01/14] Remove unused argument for nbd_client(), Jes . Sorensen, 2010/08/30
- [Qemu-devel] [PATCH 06/14] Remove unused argument for encrypt_sectors(),
Jes . Sorensen <=
- [Qemu-devel] [PATCH 05/14] Remove unused argument for check_for_block_signature(), Jes . Sorensen, 2010/08/30
- [Qemu-devel] [PATCH 08/14] Remove unused argument for qcow2_encrypt_sectors(), 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 10/14] Zero json struct with memset() instea of = {} to keep compiler happy., Jes . Sorensen, 2010/08/30