remote generator, client: Add more special case handling

For virDomainDestroy and virDrvSupportsFeature.
This commit is contained in:
Matthias Bolte
2011-05-14 15:56:03 +02:00
parent 0882f7a200
commit 55cb8f5baa
3 changed files with 16 additions and 57 deletions

View File

@@ -1065,6 +1065,15 @@ elsif ($opt_k) {
print "\n";
print " remoteDriverLock(priv);\n";
if ($call->{ProcName} eq "SupportsFeature") {
# SPECIAL: VIR_DRV_FEATURE_REMOTE feature is handled directly
print "\n";
print " if (feature == VIR_DRV_FEATURE_REMOTE) {\n";
print " rv = 1;\n";
print " goto done;\n";
print " }\n";
}
foreach my $args_check (@args_check_list) {
print "\n";
print " if ($args_check->{arg} > $args_check->{limit}) {\n";
@@ -1140,6 +1149,11 @@ elsif ($opt_k) {
print "\n";
}
if ($call->{ProcName} eq "DomainDestroy") {
# SPECIAL: virDomainDestroy needs to reset the domain id explicitly
print " dom->id = -1;\n";
}
if ($multi_ret or !@ret_list) {
print " rv = 0;\n";
}