Implement remote bits for vol wiping

This commit is contained in:
David Allan
2010-03-19 14:43:02 -04:00
parent d36b4e92ac
commit 3fdb9ba760
8 changed files with 100 additions and 1 deletions
+32
View File
@@ -4272,6 +4272,38 @@ remoteDispatchStorageVolDelete (struct qemud_server *server ATTRIBUTE_UNUSED,
return 0;
}
static int
remoteDispatchStorageVolWipe(struct qemud_server *server ATTRIBUTE_UNUSED,
struct qemud_client *client ATTRIBUTE_UNUSED,
virConnectPtr conn,
remote_message_header *hdr ATTRIBUTE_UNUSED,
remote_error *rerr,
remote_storage_vol_wipe_args *args,
void *ret ATTRIBUTE_UNUSED)
{
int retval = -1;
virStorageVolPtr vol;
vol = get_nonnull_storage_vol(conn, args->vol);
if (vol == NULL) {
remoteDispatchConnError(rerr, conn);
goto out;
}
if (virStorageVolWipe(vol, args->flags) == -1) {
remoteDispatchConnError(rerr, conn);
goto out;
}
retval = 0;
out:
if (vol != NULL) {
virStorageVolFree(vol);
}
return retval;
}
static int
remoteDispatchStorageVolGetInfo (struct qemud_server *server ATTRIBUTE_UNUSED,
struct qemud_client *client ATTRIBUTE_UNUSED,
+1
View File
@@ -140,3 +140,4 @@
remote_cpu_baseline_args val_remote_cpu_baseline_args;
remote_domain_get_job_info_args val_remote_domain_get_job_info_args;
remote_domain_abort_job_args val_remote_domain_abort_job_args;
remote_storage_vol_wipe_args val_remote_storage_vol_wipe_args;
+8
View File
@@ -1298,6 +1298,14 @@ static int remoteDispatchStorageVolLookupByPath(
remote_error *err,
remote_storage_vol_lookup_by_path_args *args,
remote_storage_vol_lookup_by_path_ret *ret);
static int remoteDispatchStorageVolWipe(
struct qemud_server *server,
struct qemud_client *client,
virConnectPtr conn,
remote_message_header *hdr,
remote_error *err,
remote_storage_vol_wipe_args *args,
void *ret);
static int remoteDispatchSupportsFeature(
struct qemud_server *server,
struct qemud_client *client,
+5
View File
@@ -827,3 +827,8 @@
.args_filter = (xdrproc_t) xdr_remote_domain_abort_job_args,
.ret_filter = (xdrproc_t) xdr_void,
},
{ /* StorageVolWipe => 165 */
.fn = (dispatch_fn) remoteDispatchStorageVolWipe,
.args_filter = (xdrproc_t) xdr_remote_storage_vol_wipe_args,
.ret_filter = (xdrproc_t) xdr_void,
},