You need to sign in or sign up before continuing.
提交 f61770a1 编写于 作者: J Ján Tomko

virStorageBackendWipeLocal: remove bytes_wiped argument

It is not used by the caller.
上级 c3f7371c
...@@ -1990,8 +1990,7 @@ static int ...@@ -1990,8 +1990,7 @@ static int
virStorageBackendWipeLocal(virStorageVolDefPtr vol, virStorageBackendWipeLocal(virStorageVolDefPtr vol,
int fd, int fd,
unsigned long long wipe_len, unsigned long long wipe_len,
size_t writebuf_length, size_t writebuf_length)
size_t *bytes_wiped)
{ {
int ret = -1, written = 0; int ret = -1, written = 0;
unsigned long long remaining = 0; unsigned long long remaining = 0;
...@@ -2025,7 +2024,6 @@ virStorageBackendWipeLocal(virStorageVolDefPtr vol, ...@@ -2025,7 +2024,6 @@ virStorageBackendWipeLocal(virStorageVolDefPtr vol,
goto cleanup; goto cleanup;
} }
*bytes_wiped += written;
remaining -= written; remaining -= written;
} }
...@@ -2036,8 +2034,8 @@ virStorageBackendWipeLocal(virStorageVolDefPtr vol, ...@@ -2036,8 +2034,8 @@ virStorageBackendWipeLocal(virStorageVolDefPtr vol,
goto cleanup; goto cleanup;
} }
VIR_DEBUG("Wrote %zu bytes to volume with path '%s'", VIR_DEBUG("Wrote %llu bytes to volume with path '%s'",
*bytes_wiped, vol->target.path); wipe_len, vol->target.path);
ret = 0; ret = 0;
...@@ -2056,7 +2054,6 @@ virStorageBackendVolWipeLocal(virConnectPtr conn ATTRIBUTE_UNUSED, ...@@ -2056,7 +2054,6 @@ virStorageBackendVolWipeLocal(virConnectPtr conn ATTRIBUTE_UNUSED,
{ {
int ret = -1, fd = -1; int ret = -1, fd = -1;
struct stat st; struct stat st;
size_t bytes_wiped = 0;
virCommandPtr cmd = NULL; virCommandPtr cmd = NULL;
virCheckFlags(0, -1); virCheckFlags(0, -1);
...@@ -2127,8 +2124,7 @@ virStorageBackendVolWipeLocal(virConnectPtr conn ATTRIBUTE_UNUSED, ...@@ -2127,8 +2124,7 @@ virStorageBackendVolWipeLocal(virConnectPtr conn ATTRIBUTE_UNUSED,
ret = virStorageBackendWipeLocal(vol, ret = virStorageBackendWipeLocal(vol,
fd, fd,
vol->target.allocation, vol->target.allocation,
st.st_blksize, st.st_blksize);
&bytes_wiped);
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册