Devel
Threads by month
- ----- 2026 -----
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- 32 participants
- 40376 discussions
This series probably would qualify as build breaker but I'm posting it anyways.
Without this, docs building in apibuild.py fails.
Peter Krempa (2):
docs: Add method to print warnings in docBuilder class
lib: Revert removing of Summary and Description fields in headers
docs/apibuild.py | 5 +++++
include/libvirt/libvirt-qemu.h | 3 +++
include/libvirt/libvirt.h.in | 3 +++
include/libvirt/virterror.h | 3 +++
4 files changed, 14 insertions(+), 0 deletions(-)
--
1.7.8.6
2
4
27 Jul '12
From: "Daniel P. Berrange" <berrange(a)redhat.com>
The cfg.mk file rule to check for tab characters was not
applied to perl files. Much of our Perl code is full of
tabs as a result. Kill them, kill them all !
---
build-aux/augeas-gentest.pl | 42 +++----
cfg.mk | 2 +-
docs/hvsupport.pl | 268 +++++++++++++++++++++----------------------
docs/todo.pl | 42 +++----
src/check-symfile.pl | 4 +-
src/dtrace2systemtap.pl | 104 ++++++++---------
src/rpc/gendispatch.pl | 180 ++++++++++++++---------------
src/rpc/genprotocol.pl | 106 ++++++++---------
src/rpc/gensystemtap.pl | 48 ++++----
tests/oomtrace.pl | 6 +-
10 files changed, 401 insertions(+), 401 deletions(-)
diff --git a/build-aux/augeas-gentest.pl b/build-aux/augeas-gentest.pl
index a5f9fd3..607ea20 100755
--- a/build-aux/augeas-gentest.pl
+++ b/build-aux/augeas-gentest.pl
@@ -41,28 +41,28 @@ open TEMPLATE, "<", $template or die "cannot read $template: $!";
my $group = 0;
while (<TEMPLATE>) {
if (/::CONFIG::/) {
- my $group = 0;
- print AUGTEST " let conf = \"";
- while (<CONFIG>) {
- if (/^#\w/) {
- s/^#//;
- s/\"/\\\"/g;
- print AUGTEST $_;
- $group = /\[\s$/;
- } elsif ($group) {
- s/\"/\\\"/g;
- if (/#\s*\]/) {
- $group = 0;
- }
- if (/^#/) {
- s/^#//;
- print AUGTEST $_;
- }
- }
- }
- print AUGTEST "\"\n";
+ my $group = 0;
+ print AUGTEST " let conf = \"";
+ while (<CONFIG>) {
+ if (/^#\w/) {
+ s/^#//;
+ s/\"/\\\"/g;
+ print AUGTEST $_;
+ $group = /\[\s$/;
+ } elsif ($group) {
+ s/\"/\\\"/g;
+ if (/#\s*\]/) {
+ $group = 0;
+ }
+ if (/^#/) {
+ s/^#//;
+ print AUGTEST $_;
+ }
+ }
+ }
+ print AUGTEST "\"\n";
} else {
- print AUGTEST $_;
+ print AUGTEST $_;
}
}
diff --git a/cfg.mk b/cfg.mk
index 68f3a91..aa457f9 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -453,7 +453,7 @@ sc_size_of_brackets:
# Ensure that no C source file, docs, or rng schema uses TABs for
# indentation. Also match *.h.in files, to get libvirt.h.in. Exclude
# files in gnulib, since they're imported.
-space_indent_files=(\.(rng|s?[ch](\.in)?|html.in|py|syms)|(daemon|tools)/.*\.in)
+space_indent_files=(\.(rng|s?[ch](\.in)?|html.in|py|pl|syms)|(daemon|tools)/.*\.in)
sc_TAB_in_indentation:
@prohibit='^ * ' \
in_vc_files='$(space_indent_files)$$' \
diff --git a/docs/hvsupport.pl b/docs/hvsupport.pl
index b0d1f0f..4871739 100755
--- a/docs/hvsupport.pl
+++ b/docs/hvsupport.pl
@@ -27,9 +27,9 @@ my %groupheaders = (
my @srcs;
find({
wanted => sub {
- if (m!$srcdir/.*/\w+_(driver|tmpl|monitor|hal|udev)\.c$!) {
- push @srcs, $_ if $_ !~ /vbox_driver\.c/;
- }
+ if (m!$srcdir/.*/\w+_(driver|tmpl|monitor|hal|udev)\.c$!) {
+ push @srcs, $_ if $_ !~ /vbox_driver\.c/;
+ }
}, no_chdir => 1}, $srcdir);
my $line;
@@ -47,26 +47,26 @@ while (defined($line = <FILE>)) {
next if $line =~ /^\s*$/;
next if $line =~ /^\s*(global|local):/;
if ($line =~ /^\s*LIBVIRT_(\d+\.\d+\.\d+)\s*{\s*$/) {
- if (defined $vers) {
- die "malformed syms file";
- }
- $vers = $1;
+ if (defined $vers) {
+ die "malformed syms file";
+ }
+ $vers = $1;
} elsif ($line =~ /\s*}\s*;\s*$/) {
- if (defined $prevvers) {
- die "malformed syms file";
- }
- $prevvers = $vers;
- $vers = undef;
+ if (defined $prevvers) {
+ die "malformed syms file";
+ }
+ $prevvers = $vers;
+ $vers = undef;
} elsif ($line =~ /\s*}\s*LIBVIRT_(\d+\.\d+\.\d+)\s*;\s*$/) {
- if ($1 ne $prevvers) {
- die "malformed syms file $1 != $vers";
- }
- $prevvers = $vers;
- $vers = undef;
+ if ($1 ne $prevvers) {
+ die "malformed syms file $1 != $vers";
+ }
+ $prevvers = $vers;
+ $vers = undef;
} elsif ($line =~ /\s*(\w+)\s*;\s*$/) {
- $apis{$1} = $vers;
+ $apis{$1} = $vers;
} else {
- die "unexpected data $line\n";
+ die "unexpected data $line\n";
}
}
@@ -86,26 +86,26 @@ while (defined($line = <FILE>)) {
next if $line =~ /^\s*$/;
next if $line =~ /^\s*(global|local):/;
if ($line =~ /^\s*LIBVIRT_QEMU_(\d+\.\d+\.\d+)\s*{\s*$/) {
- if (defined $vers) {
- die "malformed syms file";
- }
- $vers = $1;
+ if (defined $vers) {
+ die "malformed syms file";
+ }
+ $vers = $1;
} elsif ($line =~ /\s*}\s*;\s*$/) {
- if (defined $prevvers) {
- die "malformed syms file";
- }
- $prevvers = $vers;
- $vers = undef;
+ if (defined $prevvers) {
+ die "malformed syms file";
+ }
+ $prevvers = $vers;
+ $vers = undef;
} elsif ($line =~ /\s*}\s*LIBVIRT_QEMU_(\d+\.\d+\.\d+)\s*;\s*$/) {
- if ($1 ne $prevvers) {
- die "malformed syms file $1 != $vers";
- }
- $prevvers = $vers;
- $vers = undef;
+ if ($1 ne $prevvers) {
+ die "malformed syms file $1 != $vers";
+ }
+ $prevvers = $vers;
+ $vers = undef;
} elsif ($line =~ /\s*(\w+)\s*;\s*$/) {
- $apis{$1} = $vers;
+ $apis{$1} = $vers;
} else {
- die "unexpected data $line\n";
+ die "unexpected data $line\n";
}
}
@@ -143,31 +143,31 @@ my %groups;
my $ingrp;
while (defined($line = <FILE>)) {
if ($line =~ /struct _(vir\w*(?:Driver|Monitor))/) {
- my $grp = $1;
- if ($grp ne "virStateDriver" &&
- $grp ne "virStreamDriver") {
- $ingrp = $grp;
- $groups{$ingrp} = { apis => {}, drivers => {} };
- }
+ my $grp = $1;
+ if ($grp ne "virStateDriver" &&
+ $grp ne "virStreamDriver") {
+ $ingrp = $grp;
+ $groups{$ingrp} = { apis => {}, drivers => {} };
+ }
} elsif ($ingrp) {
- if ($line =~ /^\s*vir(?:Drv|DevMon)(\w+)\s+(\w+);\s*$/) {
- my $field = $2;
- my $name = $1;
-
- my $api;
- if (exists $apis{"vir$name"}) {
- $api = "vir$name";
- } elsif (exists $apis{"virConnect$name"}) {
- $api = "virConnect$name";
- } elsif (exists $apis{"virNode$name"}) {
- $api = "virNode$name";
- } else {
- die "driver $name does not have a public API";
- }
- $groups{$ingrp}->{apis}->{$field} = $api;
- } elsif ($line =~ /};/) {
- $ingrp = undef;
- }
+ if ($line =~ /^\s*vir(?:Drv|DevMon)(\w+)\s+(\w+);\s*$/) {
+ my $field = $2;
+ my $name = $1;
+
+ my $api;
+ if (exists $apis{"vir$name"}) {
+ $api = "vir$name";
+ } elsif (exists $apis{"virConnect$name"}) {
+ $api = "virConnect$name";
+ } elsif (exists $apis{"virNode$name"}) {
+ $api = "virNode$name";
+ } else {
+ die "driver $name does not have a public API";
+ }
+ $groups{$ingrp}->{apis}->{$field} = $api;
+ } elsif ($line =~ /};/) {
+ $ingrp = undef;
+ }
}
}
@@ -179,60 +179,60 @@ close FILE;
foreach my $src (@srcs) {
open FILE, "<$src" or
- die "cannot read $src: $!";
+ die "cannot read $src: $!";
$ingrp = undef;
my $impl;
while (defined($line = <FILE>)) {
- if (!$ingrp) {
- foreach my $grp (keys %groups) {
- if ($line =~ /^\s*(?:static\s+)?$grp\s+(\w+)\s*=\s*{/ ||
- $line =~ /^\s*(?:static\s+)?$grp\s+NAME\(\w+\)\s*=\s*{/) {
- $ingrp = $grp;
- $impl = $src;
-
- if ($impl =~ m,.*/node_device_(\w+)\.c,) {
- $impl = $1;
- } else {
- $impl =~ s,.*/(\w+?)_((\w+)_)?(\w+)\.c,$1,;
- }
-
- if ($groups{$ingrp}->{drivers}->{$impl}) {
- die "Group $ingrp already contains $impl";
- }
-
- $groups{$ingrp}->{drivers}->{$impl} = {};
- }
- }
-
- } else {
- if ($line =~ m!\s*\.(\w+)\s*=\s*(\w+)\s*,?\s*(?:/\*\s*(\d+\.\d+\.\d+)\s*\*/\s*)?$!) {
- my $api = $1;
- my $meth = $2;
- my $vers = $3;
-
- next if $api eq "no" || $api eq "name";
-
- die "Method $meth in $src is missing version" unless defined $vers;
-
- die "Driver method for $api is NULL in $src" if $meth eq "NULL";
-
- if (!exists($groups{$ingrp}->{apis}->{$api})) {
- die "Found unexpected method $api in $ingrp\n";
- }
-
- $groups{$ingrp}->{drivers}->{$impl}->{$api} = $vers;
- if ($api eq "domainMigratePrepare" ||
- $api eq "domainMigratePrepare2" ||
- $api eq "domainMigratePrepare3") {
- $groups{$ingrp}->{drivers}->{$impl}->{"domainMigrate"} = $vers
- unless $groups{$ingrp}->{drivers}->{$impl}->{"domainMigrate"};
- }
-
- } elsif ($line =~ /}/) {
- $ingrp = undef;
- }
- }
+ if (!$ingrp) {
+ foreach my $grp (keys %groups) {
+ if ($line =~ /^\s*(?:static\s+)?$grp\s+(\w+)\s*=\s*{/ ||
+ $line =~ /^\s*(?:static\s+)?$grp\s+NAME\(\w+\)\s*=\s*{/) {
+ $ingrp = $grp;
+ $impl = $src;
+
+ if ($impl =~ m,.*/node_device_(\w+)\.c,) {
+ $impl = $1;
+ } else {
+ $impl =~ s,.*/(\w+?)_((\w+)_)?(\w+)\.c,$1,;
+ }
+
+ if ($groups{$ingrp}->{drivers}->{$impl}) {
+ die "Group $ingrp already contains $impl";
+ }
+
+ $groups{$ingrp}->{drivers}->{$impl} = {};
+ }
+ }
+
+ } else {
+ if ($line =~ m!\s*\.(\w+)\s*=\s*(\w+)\s*,?\s*(?:/\*\s*(\d+\.\d+\.\d+)\s*\*/\s*)?$!) {
+ my $api = $1;
+ my $meth = $2;
+ my $vers = $3;
+
+ next if $api eq "no" || $api eq "name";
+
+ die "Method $meth in $src is missing version" unless defined $vers;
+
+ die "Driver method for $api is NULL in $src" if $meth eq "NULL";
+
+ if (!exists($groups{$ingrp}->{apis}->{$api})) {
+ die "Found unexpected method $api in $ingrp\n";
+ }
+
+ $groups{$ingrp}->{drivers}->{$impl}->{$api} = $vers;
+ if ($api eq "domainMigratePrepare" ||
+ $api eq "domainMigratePrepare2" ||
+ $api eq "domainMigratePrepare3") {
+ $groups{$ingrp}->{drivers}->{$impl}->{"domainMigrate"} = $vers
+ unless $groups{$ingrp}->{drivers}->{$impl}->{"domainMigrate"};
+ }
+
+ } elsif ($line =~ /}/) {
+ $ingrp = undef;
+ }
+ }
}
close FILE;
@@ -253,21 +253,21 @@ foreach my $drv (keys %{$groups{"virDriver"}->{drivers}}) {
my $openVersStr = $groups{"virDriver"}->{drivers}->{$drv}->{"open"};
my $openVers;
if ($openVersStr =~ /(\d+)\.(\d+)\.(\d+)/) {
- $openVers = ($1 * 1000 * 1000) + ($2 * 1000) + $3;
+ $openVers = ($1 * 1000 * 1000) + ($2 * 1000) + $3;
}
# virConnectOpenReadOnly always matches virConnectOpen version
$groups{"virDriver"}->{drivers}->{$drv}->{"openReadOnly"} =
- $groups{"virDriver"}->{drivers}->{$drv}->{"open"};
+ $groups{"virDriver"}->{drivers}->{$drv}->{"open"};
# virConnectOpenAuth is always 0.4.0 if the driver existed
# before this time, otherwise it matches the version of
# the driver's virConnectOpen entry
if ($openVersStr eq "Y" ||
- $openVers >= $openAuthVers) {
- $groups{"virDriver"}->{drivers}->{$drv}->{"openAuth"} = $openVersStr;
+ $openVers >= $openAuthVers) {
+ $groups{"virDriver"}->{drivers}->{$drv}->{"openAuth"} = $openVersStr;
} else {
- $groups{"virDriver"}->{drivers}->{$drv}->{"openAuth"} = "0.4.0";
+ $groups{"virDriver"}->{drivers}->{$drv}->{"openAuth"} = "0.4.0";
}
}
@@ -283,17 +283,17 @@ foreach my $drv (keys %{$groups{"virDriver"}->{drivers}}) {
next unless defined $createVersStr;
my $createVers;
if ($createVersStr =~ /(\d+)\.(\d+)\.(\d+)/) {
- $createVers = ($1 * 1000 * 1000) + ($2 * 1000) + $3;
+ $createVers = ($1 * 1000 * 1000) + ($2 * 1000) + $3;
}
# virCreateLinux is always 0.0.3 if the driver existed
# before this time, otherwise it matches the version of
# the driver's virCreateXML entry
if ($createVersStr eq "Y" ||
- $createVers >= $createAPIVers) {
- $groups{"virDriver"}->{drivers}->{$drv}->{"domainCreateLinux"} = $createVersStr;
+ $createVers >= $createAPIVers) {
+ $groups{"virDriver"}->{drivers}->{$drv}->{"domainCreateLinux"} = $createVersStr;
} else {
- $groups{"virDriver"}->{drivers}->{$drv}->{"domainCreateLinux"} = "0.0.3";
+ $groups{"virDriver"}->{drivers}->{$drv}->{"domainCreateLinux"} = "0.0.3";
}
}
@@ -329,7 +329,7 @@ foreach my $grp (sort { $a cmp $b } keys %groups) {
EOF
foreach my $drv (sort { $a cmp $b } keys %{$groups{$grp}->{drivers}}) {
- print " <th>$drv</th>\n";
+ print " <th>$drv</th>\n";
}
print <<EOF;
@@ -340,27 +340,27 @@ EOF
my $row = 0;
foreach my $field (sort {
- $groups{$grp}->{apis}->{$a}
- cmp
- $groups{$grp}->{apis}->{$b}
- } keys %{$groups{$grp}->{apis}}) {
- my $api = $groups{$grp}->{apis}->{$field};
- my $vers = $apis{$api};
- print <<EOF;
+ $groups{$grp}->{apis}->{$a}
+ cmp
+ $groups{$grp}->{apis}->{$b}
+ } keys %{$groups{$grp}->{apis}}) {
+ my $api = $groups{$grp}->{apis}->{$field};
+ my $vers = $apis{$api};
+ print <<EOF;
<tr>
<td><a href=\"html/libvirt-libvirt.html#$api\">$api</a></td>
<td>$vers</td>
EOF
foreach my $drv (sort {$a cmp $b } keys %{$groups{$grp}->{drivers}}) {
- if (exists $groups{$grp}->{drivers}->{$drv}->{$field}) {
- print "<td>", $groups{$grp}->{drivers}->{$drv}->{$field}, "</td>\n";
- } else {
- print "<td></td>\n";
- }
+ if (exists $groups{$grp}->{drivers}->{$drv}->{$field}) {
+ print "<td>", $groups{$grp}->{drivers}->{$drv}->{$field}, "</td>\n";
+ } else {
+ print "<td></td>\n";
+ }
}
- print <<EOF;
+ print <<EOF;
</tr>
EOF
@@ -373,13 +373,13 @@ EOF
EOF
foreach my $drv (sort { $a cmp $b } keys %{$groups{$grp}->{drivers}}) {
- print " <th>$drv</th>\n";
+ print " <th>$drv</th>\n";
}
print <<EOF;
</tr>
EOF
- }
+ }
}
diff --git a/docs/todo.pl b/docs/todo.pl
index 1183ff5..68d82d4 100755
--- a/docs/todo.pl
+++ b/docs/todo.pl
@@ -22,17 +22,17 @@ my $blurb = $cfg->get("output/blurb", undef);
$SIG{__DIE__} = sub {
my $err = shift;
if (UNIVERSAL::isa($err, "BZ::Client::Exception")) {
- die "Unable to access bugzilla: " . $err->message;
+ die "Unable to access bugzilla: " . $err->message;
}
die $err;
};
my $client = BZ::Client->new(url => $server,
- user => $username,
- password => $password);
+ user => $username,
+ password => $password);
my $todo = BZ::Client::Bug->search($client, {'product' => $product,
- 'alias' => $todoalias});
+ 'alias' => $todoalias});
die "Cannot find bug alias 'libvirtTodo'" unless $#{$todo} > -1;
my $todoid = $todo->[0]->{'bug_id'};
@@ -42,7 +42,7 @@ $todosummary =~ s/^\s*\[\s*RFE\s*\]\s*:?\s*//;
$todosummary =~ s/^\s*Tracker\s*:\s*//;
my $trackers = BZ::Client::Bug->search($client, {'product' => $product,
- 'blocked' => $todoid });
+ 'blocked' => $todoid });
my @trackers;
@@ -55,27 +55,27 @@ foreach my $tracker (@{$trackers}) {
$summary =~ s/^\s*Tracker\s*:\s*//;
push @trackers, {
- id => $tracker->{'bug_id'},
- summary => $summary,
- features => [],
+ id => $tracker->{'bug_id'},
+ summary => $summary,
+ features => [],
};
}
foreach my $tracker (@trackers) {
my $features = BZ::Client::Bug->search($client, {'product' => $product,
- 'blocked' => $tracker->{id}});
+ 'blocked' => $tracker->{id}});
foreach my $feature (@{$features}) {
- next if $feature->{'bug_status'} eq "CLOSED";
+ next if $feature->{'bug_status'} eq "CLOSED";
- my $summary = $feature->{'short_desc'};
- $summary =~ s/^\s*RFE\s*:\s*//;
- $summary =~ s/^\s*\[\s*RFE\s*\]\s*:?\s*//;
+ my $summary = $feature->{'short_desc'};
+ $summary =~ s/^\s*RFE\s*:\s*//;
+ $summary =~ s/^\s*\[\s*RFE\s*\]\s*:?\s*//;
- push @{$tracker->{features}}, {
- id => $feature->{'bug_id'},
- summary => $summary,
- };
+ push @{$tracker->{features}}, {
+ id => $feature->{'bug_id'},
+ summary => $summary,
+ };
}
}
@@ -108,11 +108,11 @@ foreach my $tracker (sort { $a->{summary} cmp $b->{summary} } @trackers) {
print " <h2><a href=\"$server/$id\">$summary</a></h2>\n";
print " <ul>\n";
foreach my $feature (sort { $a->{summary} cmp $b->{summary} } @{$tracker->{features}}) {
- $summary = &escape($feature->{summary});
- $summary =~ s,^([^:]+):,<strong>$1</strong>,;
+ $summary = &escape($feature->{summary});
+ $summary =~ s,^([^:]+):,<strong>$1</strong>,;
- $id = $feature->{id};
- print " <li>$summary (<strong>rhbz <a href=\"$server/$id\">$id</a></strong>)</li>\n";
+ $id = $feature->{id};
+ print " <li>$summary (<strong>rhbz <a href=\"$server/$id\">$id</a></strong>)</li>\n";
}
print " </ul>\n";
}
diff --git a/src/check-symfile.pl b/src/check-symfile.pl
index 19ffec5..73cdfcd 100755
--- a/src/check-symfile.pl
+++ b/src/check-symfile.pl
@@ -34,9 +34,9 @@ foreach my $elflib (@elflibs) {
open NM, "-|", "nm", $elflib or die "cannot run 'nm $elflib': $!";
while (<NM>) {
- next unless /^\S+\s(?:T|D)\s(\S+)\s*$/;
+ next unless /^\S+\s(?:T|D)\s(\S+)\s*$/;
- $gotsyms{$1} = 1;
+ $gotsyms{$1} = 1;
}
close NM;
diff --git a/src/dtrace2systemtap.pl b/src/dtrace2systemtap.pl
index 4c6c249..8852379 100755
--- a/src/dtrace2systemtap.pl
+++ b/src/dtrace2systemtap.pl
@@ -46,38 +46,38 @@ while (<>) {
next if /^\s*};\s*$/;
if (m,^\s*\#,) {
- if (m,^\s*\#\s*file:\s*(\S+)\s*$,) {
- $file = $1;
- push @files, $file;
- $files{$file} = { prefix => undef, probes => [] };
- } elsif (m,^\s*\#\s*prefix:\s*(\S+)\s*$,) {
- $files{$file}->{prefix} = $1;
- } elsif (m,^\s*\#\s*binary:\s*(\S+)\s*$,) {
- $files{$file}->{binary} = $1;
- } else {
- # ignore unknown comments
- }
+ if (m,^\s*\#\s*file:\s*(\S+)\s*$,) {
+ $file = $1;
+ push @files, $file;
+ $files{$file} = { prefix => undef, probes => [] };
+ } elsif (m,^\s*\#\s*prefix:\s*(\S+)\s*$,) {
+ $files{$file}->{prefix} = $1;
+ } elsif (m,^\s*\#\s*binary:\s*(\S+)\s*$,) {
+ $files{$file}->{binary} = $1;
+ } else {
+ # ignore unknown comments
+ }
} else {
- if (m,\s*probe\s+([a-zA-Z0-9_]+)\((.*?)(\);)?$,) {
- $probe = $1;
- $args = $2;
- if ($3) {
- push @{$files{$file}->{probes}}, [$probe, $args];
- $probe = $args = undef;
- }
- } elsif ($probe) {
- if (m,^(.*?)(\);)?$,) {
- $args .= $1;
- if ($2) {
- push @{$files{$file}->{probes}}, [$probe, $args];
- $probe = $args = undef;
- }
- } else {
- die "unexpected data $_ on line $.";
- }
- } else {
- die "unexpected data $_ on line $.";
- }
+ if (m,\s*probe\s+([a-zA-Z0-9_]+)\((.*?)(\);)?$,) {
+ $probe = $1;
+ $args = $2;
+ if ($3) {
+ push @{$files{$file}->{probes}}, [$probe, $args];
+ $probe = $args = undef;
+ }
+ } elsif ($probe) {
+ if (m,^(.*?)(\);)?$,) {
+ $args .= $1;
+ if ($2) {
+ push @{$files{$file}->{probes}}, [$probe, $args];
+ $probe = $args = undef;
+ }
+ } else {
+ die "unexpected data $_ on line $.";
+ }
+ } else {
+ die "unexpected data $_ on line $.";
+ }
}
}
@@ -88,32 +88,32 @@ foreach my $file (@files) {
print "# $file\n\n";
foreach my $probe (@probes) {
- my $name = $probe->[0];
- my $args = $probe->[1];
+ my $name = $probe->[0];
+ my $args = $probe->[1];
- my $pname = $name;
- $pname =~ s/${prefix}_/libvirt.$prefix./;
+ my $pname = $name;
+ $pname =~ s/${prefix}_/libvirt.$prefix./;
- my $binary = "$libdir/libvirt.so";
- if (exists $files{$file}->{binary}) {
- $binary = $sbindir . "/" . $files{$file}->{binary};
- }
+ my $binary = "$libdir/libvirt.so";
+ if (exists $files{$file}->{binary}) {
+ $binary = $sbindir . "/" . $files{$file}->{binary};
+ }
- print "probe $pname = process(\"$binary\").mark(\"$name\") {\n";
+ print "probe $pname = process(\"$binary\").mark(\"$name\") {\n";
- my @args = split /,/, $args;
- for (my $i = 0 ; $i <= $#args ; $i++) {
- my $arg = $args[$i];
- my $isstr = $arg =~ /char\s+\*/;
- $arg =~ s/^.*\s\*?(\S+)$/$1/;
+ my @args = split /,/, $args;
+ for (my $i = 0 ; $i <= $#args ; $i++) {
+ my $arg = $args[$i];
+ my $isstr = $arg =~ /char\s+\*/;
+ $arg =~ s/^.*\s\*?(\S+)$/$1/;
- if ($isstr) {
- print " $arg = user_string(\$arg", $i + 1, ");\n";
- } else {
- print " $arg = \$arg", $i + 1, ";\n";
- }
- }
- print "}\n\n";
+ if ($isstr) {
+ print " $arg = user_string(\$arg", $i + 1, ");\n";
+ } else {
+ print " $arg = \$arg", $i + 1, ";\n";
+ }
+ }
+ print "}\n\n";
}
print "\n";
}
diff --git a/src/rpc/gendispatch.pl b/src/rpc/gendispatch.pl
index 17bfb2e..3a66445 100755
--- a/src/rpc/gendispatch.pl
+++ b/src/rpc/gendispatch.pl
@@ -54,11 +54,11 @@ sub name_to_ProcName {
my @elems;
if ($name =~ /_/ || (lc $name) eq "open" || (lc $name) eq "close") {
- @elems = split /_/, $name;
- @elems = map lc, @elems;
- @elems = map ucfirst, @elems;
+ @elems = split /_/, $name;
+ @elems = map lc, @elems;
+ @elems = map ucfirst, @elems;
} else {
- @elems = $name;
+ @elems = $name;
}
@elems = map { fixup_name($_) } @elems;
my $procname = join "", @elems;
@@ -332,53 +332,53 @@ elsif ($opt_b) {
# skip things which are REMOTE_MESSAGE
next if $call->{msg};
- my $name = $structprefix . "Dispatch" . $call->{ProcName};
- my $argtype = $call->{args};
- my $rettype = $call->{ret};
-
- my $argann = $argtype ne "void" ? "" : " ATTRIBUTE_UNUSED";
- my $retann = $rettype ne "void" ? "" : " ATTRIBUTE_UNUSED";
-
- # First we print out a function declaration for the
- # real dispatcher body
- print "static int ${name}(\n";
- print " virNetServerPtr server,\n";
- print " virNetServerClientPtr client,\n";
- print " virNetMessagePtr msg,\n";
- print " virNetMessageErrorPtr rerr";
- if ($argtype ne "void") {
- print ",\n $argtype *args";
- }
- if ($rettype ne "void") {
- print ",\n $rettype *ret";
- }
- print ");\n";
-
-
- # Next we print out a generic wrapper method which has
- # fixed function signature, for use in the dispatcher
- # table. This simply callers the real dispatcher method
- print "static int ${name}Helper(\n";
- print " virNetServerPtr server,\n";
- print " virNetServerClientPtr client,\n";
- print " virNetMessagePtr msg,\n";
- print " virNetMessageErrorPtr rerr,\n";
- print " void *args$argann,\n";
- print " void *ret$retann)\n";
- print "{\n";
- print " VIR_DEBUG(\"server=%p client=%p msg=%p rerr=%p args=%p ret=%p\", server, client, msg, rerr, args, ret);\n";
- print " return $name(server, client, msg, rerr";
- if ($argtype ne "void") {
- print ", args";
- }
- if ($rettype ne "void") {
- print ", ret";
- }
- print ");\n";
- print "}\n";
-
- # Finally we print out the dispatcher method body impl
- # (if possible)
+ my $name = $structprefix . "Dispatch" . $call->{ProcName};
+ my $argtype = $call->{args};
+ my $rettype = $call->{ret};
+
+ my $argann = $argtype ne "void" ? "" : " ATTRIBUTE_UNUSED";
+ my $retann = $rettype ne "void" ? "" : " ATTRIBUTE_UNUSED";
+
+ # First we print out a function declaration for the
+ # real dispatcher body
+ print "static int ${name}(\n";
+ print " virNetServerPtr server,\n";
+ print " virNetServerClientPtr client,\n";
+ print " virNetMessagePtr msg,\n";
+ print " virNetMessageErrorPtr rerr";
+ if ($argtype ne "void") {
+ print ",\n $argtype *args";
+ }
+ if ($rettype ne "void") {
+ print ",\n $rettype *ret";
+ }
+ print ");\n";
+
+
+ # Next we print out a generic wrapper method which has
+ # fixed function signature, for use in the dispatcher
+ # table. This simply callers the real dispatcher method
+ print "static int ${name}Helper(\n";
+ print " virNetServerPtr server,\n";
+ print " virNetServerClientPtr client,\n";
+ print " virNetMessagePtr msg,\n";
+ print " virNetMessageErrorPtr rerr,\n";
+ print " void *args$argann,\n";
+ print " void *ret$retann)\n";
+ print "{\n";
+ print " VIR_DEBUG(\"server=%p client=%p msg=%p rerr=%p args=%p ret=%p\", server, client, msg, rerr, args, ret);\n";
+ print " return $name(server, client, msg, rerr";
+ if ($argtype ne "void") {
+ print ", args";
+ }
+ if ($rettype ne "void") {
+ print ", ret";
+ }
+ print ");\n";
+ print "}\n";
+
+ # Finally we print out the dispatcher method body impl
+ # (if possible)
if (!exists($generate{$call->{ProcName}})) {
print "/* ${structprefix}Dispatch$call->{ProcName} body has " .
"to be implemented manually */\n\n\n\n";
@@ -794,18 +794,18 @@ elsif ($opt_b) {
}
# print functions signature
- print "static int $name(\n";
- print " virNetServerPtr server ATTRIBUTE_UNUSED,\n";
- print " virNetServerClientPtr client,\n";
- print " virNetMessagePtr msg ATTRIBUTE_UNUSED,\n";
- print " virNetMessageErrorPtr rerr";
+ print "static int $name(\n";
+ print " virNetServerPtr server ATTRIBUTE_UNUSED,\n";
+ print " virNetServerClientPtr client,\n";
+ print " virNetMessagePtr msg ATTRIBUTE_UNUSED,\n";
+ print " virNetMessageErrorPtr rerr";
if ($argtype ne "void") {
- print ",\n $argtype *args";
- }
+ print ",\n $argtype *args";
+ }
if ($rettype ne "void") {
- print ",\n $rettype *ret";
- }
- print ")\n";
+ print ",\n $rettype *ret";
+ }
+ print ")\n";
# print function body
print "{\n";
@@ -814,7 +814,7 @@ elsif ($opt_b) {
foreach my $var (@vars_list) {
print " $var;\n";
}
- print " struct daemonClientPrivate *priv =\n";
+ print " struct daemonClientPrivate *priv =\n";
print " virNetServerClientGetPrivateData(client);\n";
if ($call->{streamflag} ne "none") {
@@ -994,32 +994,32 @@ elsif ($opt_b) {
print "virNetServerProgramProc ${structprefix}Procs[] = {\n";
for ($id = 0 ; $id <= $#calls ; $id++) {
- my ($comment, $name, $argtype, $arglen, $argfilter, $retlen, $retfilter, $priority);
-
- if (defined $calls[$id] && !$calls[$id]->{msg}) {
- $comment = "/* Method $calls[$id]->{ProcName} => $id */";
- $name = $structprefix . "Dispatch" . $calls[$id]->{ProcName} . "Helper";
- my $argtype = $calls[$id]->{args};
- my $rettype = $calls[$id]->{ret};
- $arglen = $argtype ne "void" ? "sizeof($argtype)" : "0";
- $retlen = $rettype ne "void" ? "sizeof($rettype)" : "0";
- $argfilter = $argtype ne "void" ? "xdr_$argtype" : "xdr_void";
- $retfilter = $rettype ne "void" ? "xdr_$rettype" : "xdr_void";
- } else {
- if ($calls[$id]->{msg}) {
- $comment = "/* Async event $calls[$id]->{ProcName} => $id */";
- } else {
- $comment = "/* Unused $id */";
- }
- $name = "NULL";
- $arglen = $retlen = 0;
- $argfilter = "xdr_void";
- $retfilter = "xdr_void";
- }
+ my ($comment, $name, $argtype, $arglen, $argfilter, $retlen, $retfilter, $priority);
+
+ if (defined $calls[$id] && !$calls[$id]->{msg}) {
+ $comment = "/* Method $calls[$id]->{ProcName} => $id */";
+ $name = $structprefix . "Dispatch" . $calls[$id]->{ProcName} . "Helper";
+ my $argtype = $calls[$id]->{args};
+ my $rettype = $calls[$id]->{ret};
+ $arglen = $argtype ne "void" ? "sizeof($argtype)" : "0";
+ $retlen = $rettype ne "void" ? "sizeof($rettype)" : "0";
+ $argfilter = $argtype ne "void" ? "xdr_$argtype" : "xdr_void";
+ $retfilter = $rettype ne "void" ? "xdr_$rettype" : "xdr_void";
+ } else {
+ if ($calls[$id]->{msg}) {
+ $comment = "/* Async event $calls[$id]->{ProcName} => $id */";
+ } else {
+ $comment = "/* Unused $id */";
+ }
+ $name = "NULL";
+ $arglen = $retlen = 0;
+ $argfilter = "xdr_void";
+ $retfilter = "xdr_void";
+ }
$priority = defined $calls[$id]->{priority} ? $calls[$id]->{priority} : 0;
- print "{ $comment\n ${name},\n $arglen,\n (xdrproc_t)$argfilter,\n $retlen,\n (xdrproc_t)$retfilter,\n true,\n $priority\n},\n";
+ print "{ $comment\n ${name},\n $arglen,\n (xdrproc_t)$argfilter,\n $retlen,\n (xdrproc_t)$retfilter,\n true,\n $priority\n},\n";
}
print "};\n";
print "size_t ${structprefix}NProcs = ARRAY_CARDINALITY(${structprefix}Procs);\n";
@@ -1039,8 +1039,8 @@ elsif ($opt_k) {
# skip procedures not on generate list
next if ! exists($generate{$call->{ProcName}});
- my $argtype = $call->{args};
- my $rettype = $call->{ret};
+ my $argtype = $call->{args};
+ my $rettype = $call->{ret};
# handle arguments to the function
my @args_list = ();
@@ -1574,10 +1574,10 @@ elsif ($opt_k) {
}
if ($call->{ProcName} eq "DomainDestroy" ||
- $call->{ProcName} eq "DomainSave" ||
- $call->{ProcName} eq "DomainManagedSave") {
+ $call->{ProcName} eq "DomainSave" ||
+ $call->{ProcName} eq "DomainManagedSave") {
# SPECIAL: virDomain{Destroy|Save|ManagedSave} need to reset
- # the domain id explicitly on success
+ # the domain id explicitly on success
print " dom->id = -1;\n";
}
diff --git a/src/rpc/genprotocol.pl b/src/rpc/genprotocol.pl
index f8e68f5..c8c1570 100755
--- a/src/rpc/genprotocol.pl
+++ b/src/rpc/genprotocol.pl
@@ -41,14 +41,14 @@ while (<RPCGEN>) {
# We only want to fixup the GLibc rpcgen output
# So just print data unchanged, if non-Linux
unless ($fixup) {
- print TARGET;
- next;
+ print TARGET;
+ next;
}
if (m/^{/) {
- $in_function = 1;
- print TARGET;
- next;
+ $in_function = 1;
+ print TARGET;
+ next;
}
s/\t/ /g;
@@ -64,58 +64,58 @@ while (<RPCGEN>) {
s/(?<!IXDR_GET_INT32 )IXDR_GET_LONG/IXDR_GET_INT32/g;
if (m/^}/) {
- $in_function = 0;
-
- # Note: The body of the function is in @function.
-
- # Remove decl of buf, if buf isn't used in the function.
- my @uses = grep /[^.>]\bbuf\b/, @function;
- @function = grep !/[^.>]\bbuf\b/, @function if @uses == 1;
-
- # Remove decl of i, if i isn't used in the function.
- @uses = grep /[^.>]\bi\b/, @function;
- @function = grep !/[^.>]\bi\b/, @function if @uses == 1;
-
- # (char **)&objp->... gives:
- # warning: dereferencing type-punned pointer will break
- # strict-aliasing rules
- # so rewrite it.
- my %uses = ();
- my $i = 0;
- foreach (@function) {
- $uses{$1} = $i++ if m/\(char \*\*\)\&(objp->[a-z_.]+_val)/i;
- }
- if (keys %uses >= 1) {
- my $i = 1;
-
- foreach (keys %uses) {
- $i = $uses{$_};
- unshift @function,
- (" char **objp_cpp$i = (char **) (void *) &$_;\n");
- $i++;
- }
- @function =
- map { s{\(char \*\*\)\&(objp->[a-z_.]+_val)}
- {objp_cpp$uses{$1}}gi; $_ } @function;
- }
-
- # The code uses 'IXDR_PUT_{U_,}LONG' but it's wrong in two
- # ways: Firstly these functions are deprecated and don't
- # work on 64 bit platforms. Secondly the return value should
- # be ignored. Correct both these mistakes.
- @function =
- map { s/\bIXDR_PUT_((U_)?)LONG\b/(void)IXDR_PUT_$1INT32/; $_ }
- map { s/\bXDR_INLINE\b/(int32_t*)XDR_INLINE/; $_ }
- @function;
-
- print TARGET (join ("", @function));
- @function = ();
+ $in_function = 0;
+
+ # Note: The body of the function is in @function.
+
+ # Remove decl of buf, if buf isn't used in the function.
+ my @uses = grep /[^.>]\bbuf\b/, @function;
+ @function = grep !/[^.>]\bbuf\b/, @function if @uses == 1;
+
+ # Remove decl of i, if i isn't used in the function.
+ @uses = grep /[^.>]\bi\b/, @function;
+ @function = grep !/[^.>]\bi\b/, @function if @uses == 1;
+
+ # (char **)&objp->... gives:
+ # warning: dereferencing type-punned pointer will break
+ # strict-aliasing rules
+ # so rewrite it.
+ my %uses = ();
+ my $i = 0;
+ foreach (@function) {
+ $uses{$1} = $i++ if m/\(char \*\*\)\&(objp->[a-z_.]+_val)/i;
+ }
+ if (keys %uses >= 1) {
+ my $i = 1;
+
+ foreach (keys %uses) {
+ $i = $uses{$_};
+ unshift @function,
+ (" char **objp_cpp$i = (char **) (void *) &$_;\n");
+ $i++;
+ }
+ @function =
+ map { s{\(char \*\*\)\&(objp->[a-z_.]+_val)}
+ {objp_cpp$uses{$1}}gi; $_ } @function;
+ }
+
+ # The code uses 'IXDR_PUT_{U_,}LONG' but it's wrong in two
+ # ways: Firstly these functions are deprecated and don't
+ # work on 64 bit platforms. Secondly the return value should
+ # be ignored. Correct both these mistakes.
+ @function =
+ map { s/\bIXDR_PUT_((U_)?)LONG\b/(void)IXDR_PUT_$1INT32/; $_ }
+ map { s/\bXDR_INLINE\b/(int32_t*)XDR_INLINE/; $_ }
+ @function;
+
+ print TARGET (join ("", @function));
+ @function = ();
}
unless ($in_function) {
- print TARGET;
+ print TARGET;
} else {
- push @function, $_;
+ push @function, $_;
}
}
diff --git a/src/rpc/gensystemtap.pl b/src/rpc/gensystemtap.pl
index 1cf9c0f..41c5625 100755
--- a/src/rpc/gensystemtap.pl
+++ b/src/rpc/gensystemtap.pl
@@ -37,33 +37,33 @@ my $intype = 0;
my $inauth = 0;
while (<>) {
if (/enum\s+virNetMessageType/) {
- $intype = 1;
+ $intype = 1;
} elsif (/enum\s+virNetMessageStatus/) {
- $instatus = 1;
+ $instatus = 1;
} elsif (/enum remote_auth_type/) {
- $inauth = 1;
+ $inauth = 1;
} elsif (/}/) {
- $instatus = $intype = $inauth = 0;
+ $instatus = $intype = $inauth = 0;
} elsif ($instatus) {
- if (/^\s+VIR_NET_(\w+)\s*=\s*(\d+),?$/) {
- $status{$2} = lc $1;
- }
+ if (/^\s+VIR_NET_(\w+)\s*=\s*(\d+),?$/) {
+ $status{$2} = lc $1;
+ }
} elsif ($intype) {
- if (/^\s+VIR_NET_(\w+)\s*=\s*(\d+),?$/) {
- $type{$2} = lc $1;
- }
+ if (/^\s+VIR_NET_(\w+)\s*=\s*(\d+),?$/) {
+ $type{$2} = lc $1;
+ }
} elsif ($inauth) {
- if (/^\s+REMOTE_AUTH_(\w+)\s*=\s*(\d+),?$/) {
- $auth{$2} = lc $1;
- }
+ if (/^\s+REMOTE_AUTH_(\w+)\s*=\s*(\d+),?$/) {
+ $auth{$2} = lc $1;
+ }
} else {
- if (/(\w+)_PROGRAM\s*=\s*0x([a-fA-F0-9]+)\s*;/) {
- $funcs{lc $1} = { id => hex($2), version => undef, progs => [] };
- } elsif (/(\w+)_PROTOCOL_VERSION\s*=\s*(\d+)\s*;/) {
- $funcs{lc $1}->{version} = $2;
- } elsif (/(\w+)_PROC_(.*?)\s+=\s+(\d+)/) {
- $funcs{lc $1}->{progs}->[$3] = lc $2;
- }
+ if (/(\w+)_PROGRAM\s*=\s*0x([a-fA-F0-9]+)\s*;/) {
+ $funcs{lc $1} = { id => hex($2), version => undef, progs => [] };
+ } elsif (/(\w+)_PROTOCOL_VERSION\s*=\s*(\d+)\s*;/) {
+ $funcs{lc $1}->{version} = $2;
+ } elsif (/(\w+)_PROC_(.*?)\s+=\s+(\d+)/) {
+ $funcs{lc $1}->{progs}->[$3] = lc $2;
+ }
}
}
@@ -172,10 +172,10 @@ foreach my $prog (keys %funcs) {
my $pfirst = 1;
for (my $id = 1 ; $id <= $#{$funcs{$prog}->{progs}} ; $id++) {
- my $cond = $pfirst ? "if" : "} else if";
- $pfirst = 0;
- print " $cond (proc == $id) {\n";
- print " procstr = \"", $funcs{$prog}->{progs}->[$id], "\";\n";
+ my $cond = $pfirst ? "if" : "} else if";
+ $pfirst = 0;
+ print " $cond (proc == $id) {\n";
+ print " procstr = \"", $funcs{$prog}->{progs}->[$id], "\";\n";
}
print " } else {\n";
print " procstr = \"unknown\";\n";
diff --git a/tests/oomtrace.pl b/tests/oomtrace.pl
index c615ed9..6d423e7 100755
--- a/tests/oomtrace.pl
+++ b/tests/oomtrace.pl
@@ -21,7 +21,7 @@ my %lines;
foreach (@data) {
if (/^\s*TRACE:\s+(\S+?)(?:\(.*\))?\s+\[0x(.*)\]\s*$/ ) {
- $trace{$2} = $1;
+ $trace{$2} = $1;
}
}
@@ -34,8 +34,8 @@ foreach my $key (keys %trace) {
foreach (@data) {
if (/^\s*TRACE:\s+(\S+?)(?:\(.*\))?\s+\[0x(.*)\]\s*$/ ) {
- print $lines{$2};
+ print $lines{$2};
} else {
- print;
+ print;
}
}
--
1.7.10.4
3
3
Hi all.
I amd trying to use libvirt-php to build a public cloud. I used Vmware
hypervisor (free), XEN and KVM. Now I want to create a Virtual Machine from
template. After that, I want to install some application on that VM.
*Can I run a shell script in Guest OS via Libvirt?*
Tuyen V. Doan
---------------------------------------------------------------------------------------------------------------
Đoàn Văn Tuyển
Mobile: 0904.554.112
Email : DoanVanTuyen(a)gmail.com
ITBachKhoa(a)yahoo.com.vn
--------------------------------------------
Ti`m di.a diem http://timdiadiem.net
2
1
Parallels Cloud Server is a cloud-ready virtualization
solution that allows users to simultaneously run multiple virtual
machines and containers on the same physical server.
More information can be found here: http://www.parallels.com/products/pcs/
Also beta version of Parallels Cloud Server can be downloaded there.
Signed-off-by: Dmitry Guryanov <dguryanov(a)parallels.com>
---
configure.ac | 61 ++++++---
docs/drvparallels.html.in | 28 ++++
include/libvirt/virterror.h | 1 +
libvirt.spec.in | 9 +-
mingw-libvirt.spec.in | 6 +
po/POTFILES.in | 1 +
src/Makefile.am | 13 ++
src/conf/domain_conf.c | 3 +-
src/conf/domain_conf.h | 1 +
src/driver.h | 1 +
src/libvirt.c | 9 ++
src/parallels/parallels_driver.c | 287 ++++++++++++++++++++++++++++++++++++++
src/parallels/parallels_driver.h | 28 ++++
src/util/virterror.c | 3 +-
14 files changed, 429 insertions(+), 22 deletions(-)
create mode 100644 docs/drvparallels.html.in
create mode 100644 src/parallels/parallels_driver.c
create mode 100644 src/parallels/parallels_driver.h
diff --git a/configure.ac b/configure.ac
index 3cc7b3c..400ac3b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -330,6 +330,8 @@ AC_ARG_WITH([esx],
AC_HELP_STRING([--with-esx], [add ESX support @<:@default=check@:>@]),[],[with_esx=check])
AC_ARG_WITH([hyperv],
AC_HELP_STRING([--with-hyperv], [add Hyper-V support @<:@default=check@:>@]),[],[with_hyperv=check])
+AC_ARG_WITH([parallels],
+ AC_HELP_STRING([--with-parallels], [add Parallels Cloud Server support @<:@default=check@:>@]),[],[with_parallels=check])
AC_ARG_WITH([test],
AC_HELP_STRING([--with-test], [add test driver support @<:@default=yes@:>@]),[],[with_test=yes])
AC_ARG_WITH([remote],
@@ -788,6 +790,26 @@ fi
AM_CONDITIONAL([WITH_LXC], [test "$with_lxc" = "yes"])
dnl
+dnl Checks for the Parallels driver
+dnl
+
+if test "$with_parallels" = "check"; then
+ with_parallels=$with_linux
+ if test ! $host_cpu = 'x86_64'; then
+ with_parallels=no
+ fi
+fi
+
+if test "$with_parallels" = "yes" && test "$with_linux" = "no"; then
+ AC_MSG_ERROR([The Parallels driver can be enabled on Linux only.])
+fi
+
+if test "$with_parallels" = "yes"; then
+ AC_DEFINE_UNQUOTED([WITH_PARALLELS], 1, [whether Parallels driver is enabled])
+fi
+AM_CONDITIONAL([WITH_PARALLELS], [test "$with_parallels" = "yes"])
+
+dnl
dnl check for shell that understands <> redirection without truncation,
dnl needed by src/qemu/qemu_monitor_{text,json}.c.
dnl
@@ -2824,25 +2846,26 @@ AC_MSG_NOTICE([=====================])
AC_MSG_NOTICE([])
AC_MSG_NOTICE([Drivers])
AC_MSG_NOTICE([])
-AC_MSG_NOTICE([ Xen: $with_xen])
-AC_MSG_NOTICE([ QEMU: $with_qemu])
-AC_MSG_NOTICE([ UML: $with_uml])
-AC_MSG_NOTICE([ OpenVZ: $with_openvz])
-AC_MSG_NOTICE([ VMware: $with_vmware])
-AC_MSG_NOTICE([ VBox: $with_vbox])
-AC_MSG_NOTICE([ XenAPI: $with_xenapi])
-AC_MSG_NOTICE([xenlight: $with_libxl])
-AC_MSG_NOTICE([ LXC: $with_lxc])
-AC_MSG_NOTICE([ PHYP: $with_phyp])
-AC_MSG_NOTICE([ ESX: $with_esx])
-AC_MSG_NOTICE([ Hyper-V: $with_hyperv])
-AC_MSG_NOTICE([ Test: $with_test])
-AC_MSG_NOTICE([ Remote: $with_remote])
-AC_MSG_NOTICE([ Network: $with_network])
-AC_MSG_NOTICE([Libvirtd: $with_libvirtd])
-AC_MSG_NOTICE([ netcf: $with_netcf])
-AC_MSG_NOTICE([ macvtap: $with_macvtap])
-AC_MSG_NOTICE([virtport: $with_virtualport])
+AC_MSG_NOTICE([ Xen: $with_xen])
+AC_MSG_NOTICE([ QEMU: $with_qemu])
+AC_MSG_NOTICE([ UML: $with_uml])
+AC_MSG_NOTICE([ OpenVZ: $with_openvz])
+AC_MSG_NOTICE([ VMware: $with_vmware])
+AC_MSG_NOTICE([ VBox: $with_vbox])
+AC_MSG_NOTICE([ XenAPI: $with_xenapi])
+AC_MSG_NOTICE([ xenlight: $with_libxl])
+AC_MSG_NOTICE([ LXC: $with_lxc])
+AC_MSG_NOTICE([ PHYP: $with_phyp])
+AC_MSG_NOTICE([ ESX: $with_esx])
+AC_MSG_NOTICE([ Hyper-V: $with_hyperv])
+AC_MSG_NOTICE([Parallels: $with_parallels])
+AC_MSG_NOTICE([ Test: $with_test])
+AC_MSG_NOTICE([ Remote: $with_remote])
+AC_MSG_NOTICE([ Network: $with_network])
+AC_MSG_NOTICE([ Libvirtd: $with_libvirtd])
+AC_MSG_NOTICE([ netcf: $with_netcf])
+AC_MSG_NOTICE([ macvtap: $with_macvtap])
+AC_MSG_NOTICE([ virtport: $with_virtualport])
AC_MSG_NOTICE([])
AC_MSG_NOTICE([Storage Drivers])
AC_MSG_NOTICE([])
diff --git a/docs/drvparallels.html.in b/docs/drvparallels.html.in
new file mode 100644
index 0000000..40a0fe5
--- /dev/null
+++ b/docs/drvparallels.html.in
@@ -0,0 +1,28 @@
+<html><body>
+ <h1>Parallels Cloud Server driver</h1>
+ <ul id="toc"></ul>
+ <p>
+ The libvirt Parallels driver can manage Parallels Cloud Server starting from version 6.0.
+ </p>
+
+
+ <h2><a name="project">Project Links</a></h2>
+ <ul>
+ <li>
+ The <a href="http://www.parallels.com/products/server/baremetal/sp/">Parallels Cloud Server</a> Virtualization Solution.
+ </li>
+ </ul>
+
+
+ <h2><a name="uri">Connections to the Parallels Cloud Server driver</a></h2>
+ <p>
+ The libvirt Parallels driver is a single-instance privileged driver, with a driver name of 'parallels'. Some example connection URIs for the libvirt driver are:
+ </p>
+<pre>
+parallels:///default (local access)
+parallels+unix:///default (local access)
+parallels://example.com/default (remote access, TLS/x509)
+parallels+tcp://example.com/default (remote access, SASl/Kerberos)
+parallels+ssh://root@example.com/default (remote access, SSH tunnelled)
+</pre>
+</body></html>
diff --git a/include/libvirt/virterror.h b/include/libvirt/virterror.h
index 0e0bc9c..1c58c66 100644
--- a/include/libvirt/virterror.h
+++ b/include/libvirt/virterror.h
@@ -97,6 +97,7 @@ typedef enum {
VIR_FROM_URI = 45, /* Error from URI handling */
VIR_FROM_AUTH = 46, /* Error from auth handling */
VIR_FROM_DBUS = 47, /* Error from DBus */
+ VIR_FROM_PARALLELS = 48, /* Error from Parallels */
# ifdef VIR_ENUM_SENTINELS
VIR_ERR_DOMAIN_LAST
diff --git a/libvirt.spec.in b/libvirt.spec.in
index cfcfc1c..c642f80 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -67,6 +67,7 @@
%define with_esx 0%{!?_without_esx:1}
%define with_hyperv 0%{!?_without_hyperv:1}
%define with_xenapi 0%{!?_without_xenapi:1}
+%define with_parallels 0%{!?_without_parallels:1}
# Then the secondary host drivers, which run inside libvirtd
%define with_network 0%{!?_without_network:%{server_drivers}}
@@ -136,6 +137,7 @@
%define with_xenapi 0
%define with_libxl 0
%define with_hyperv 0
+%define with_parallels 0
%endif
# Fedora 17 / RHEL-7 are first where we use systemd. Although earlier
@@ -1068,6 +1070,10 @@ of recent versions of Linux (and other OSes).
%define _without_vmware --without-vmware
%endif
+%if ! %{with_parallels}
+%define _without_parallels --without-parallels
+%endif
+
%if ! %{with_polkit}
%define _without_polkit --without-polkit
%endif
@@ -1210,6 +1216,7 @@ autoreconf -if
%{?_without_esx} \
%{?_without_hyperv} \
%{?_without_vmware} \
+ %{?_without_parallels} \
%{?_without_network} \
%{?_with_rhel5_api} \
%{?_without_storage_fs} \
@@ -1401,7 +1408,7 @@ fi
/sbin/chkconfig --add libvirtd
if [ "$1" -ge "1" ]; then
- /sbin/service libvirtd condrestart > /dev/null 2>&1
+ /sbin/service libvirtd condrestart > /dev/null 2>&1
fi
%endif
diff --git a/mingw-libvirt.spec.in b/mingw-libvirt.spec.in
index d2a8cf3..4695895 100644
--- a/mingw-libvirt.spec.in
+++ b/mingw-libvirt.spec.in
@@ -13,6 +13,7 @@
# missing libwsman, so can't build hyper-v
%define with_hyperv 0%{!?_without_hyperv:0}
%define with_xenapi 0%{!?_without_xenapi:1}
+%define with_parallels 0%{!?_without_parallels:0}
# RHEL ships ESX but not PowerHypervisor, HyperV, or libxenserver (xenapi)
%if 0%{?rhel}
@@ -125,6 +126,10 @@ MinGW Windows libvirt virtualization library, static version.
%define _without_xenapi --without-xenapi
%endif
+%if ! %{with_parallels}
+%define _without_parallels --without-parallels
+%endif
+
%if 0%{?enable_autotools}
autoreconf -if
%endif
@@ -148,6 +153,7 @@ autoreconf -if
%{?_without_esx} \
%{?_without_hyperv} \
--without-vmware \
+ --without-parallels \
--without-netcf \
--without-audit \
--without-dtrace
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 0f32918..c4a84a9 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -64,6 +64,7 @@ src/nwfilter/nwfilter_learnipaddr.c
src/openvz/openvz_conf.c
src/openvz/openvz_driver.c
src/openvz/openvz_util.c
+src/parallels/parallels_driver.c
src/phyp/phyp_driver.c
src/qemu/qemu_agent.c
src/qemu/qemu_bridge_filter.c
diff --git a/src/Makefile.am b/src/Makefile.am
index 93fcf3b..ca0c930 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -483,6 +483,10 @@ HYPERV_DRIVER_EXTRA_DIST = \
hyperv/hyperv_wmi_generator.py \
$(HYPERV_DRIVER_GENERATED)
+PARALLELS_DRIVER_SOURCES = \
+ parallels/parallels_driver.h \
+ parallels/parallels_driver.c
+
NETWORK_DRIVER_SOURCES = \
network/bridge_driver.h network/bridge_driver.c
@@ -921,6 +925,14 @@ libvirt_driver_hyperv_la_LIBADD = $(OPENWSMAN_LIBS)
libvirt_driver_hyperv_la_SOURCES = $(HYPERV_DRIVER_SOURCES)
endif
+if WITH_PARALLELS
+noinst_LTLIBRARIES += libvirt_driver_parallels.la
+libvirt_la_BUILT_LIBADD += libvirt_driver_parallels.la
+libvirt_driver_parallels_la_CFLAGS = \
+ -I$(top_srcdir)/src/conf $(AM_CFLAGS)
+libvirt_driver_parallels_la_SOURCES = $(PARALLELS_DRIVER_SOURCES)
+endif
+
if WITH_NETWORK
noinst_LTLIBRARIES += libvirt_driver_network_impl.la
libvirt_driver_network_la_SOURCES =
@@ -1132,6 +1144,7 @@ EXTRA_DIST += \
$(ESX_DRIVER_EXTRA_DIST) \
$(HYPERV_DRIVER_SOURCES) \
$(HYPERV_DRIVER_EXTRA_DIST) \
+ $(PARALLELS_DRIVER_SOURCES) \
$(NETWORK_DRIVER_SOURCES) \
$(INTERFACE_DRIVER_SOURCES) \
$(STORAGE_DRIVER_SOURCES) \
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index c53722a..e695417 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -93,7 +93,8 @@ VIR_ENUM_IMPL(virDomainVirt, VIR_DOMAIN_VIRT_LAST,
"vmware",
"hyperv",
"vbox",
- "phyp")
+ "phyp",
+ "parallels")
VIR_ENUM_IMPL(virDomainBoot, VIR_DOMAIN_BOOT_LAST,
"fd",
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index bc02caf..0db1693 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -160,6 +160,7 @@ enum virDomainVirtType {
VIR_DOMAIN_VIRT_HYPERV,
VIR_DOMAIN_VIRT_VBOX,
VIR_DOMAIN_VIRT_PHYP,
+ VIR_DOMAIN_VIRT_PARALLELS,
VIR_DOMAIN_VIRT_LAST,
};
diff --git a/src/driver.h b/src/driver.h
index 46d9846..aab9766 100644
--- a/src/driver.h
+++ b/src/driver.h
@@ -31,6 +31,7 @@ typedef enum {
VIR_DRV_VMWARE = 13,
VIR_DRV_LIBXL = 14,
VIR_DRV_HYPERV = 15,
+ VIR_DRV_PARALLELS = 16,
} virDrvNo;
diff --git a/src/libvirt.c b/src/libvirt.c
index 8315b4f..e3cc832 100644
--- a/src/libvirt.c
+++ b/src/libvirt.c
@@ -72,6 +72,9 @@
#ifdef WITH_XENAPI
# include "xenapi/xenapi_driver.h"
#endif
+#ifdef WITH_PARALLELS
+# include "parallels/parallels_driver.h"
+#endif
#define VIR_FROM_THIS VIR_FROM_NONE
@@ -443,6 +446,9 @@ virInitialize(void)
#ifdef WITH_XENAPI
if (xenapiRegister() == -1) return -1;
#endif
+#ifdef WITH_PARALLELS
+ if (parallelsRegister() == -1) return -1;
+#endif
#ifdef WITH_REMOTE
if (remoteRegister () == -1) return -1;
#endif
@@ -1144,6 +1150,9 @@ do_open (const char *name,
#ifndef WITH_XENAPI
STRCASEEQ(ret->uri->scheme, "xenapi") ||
#endif
+#ifndef WITH_PARALLELS
+ STRCASEEQ(ret->uri->scheme, "parallels") ||
+#endif
false)) {
virReportErrorHelper(VIR_FROM_NONE, VIR_ERR_CONFIG_UNSUPPORTED,
__FILE__, __FUNCTION__, __LINE__,
diff --git a/src/parallels/parallels_driver.c b/src/parallels/parallels_driver.c
new file mode 100644
index 0000000..00a9074
--- /dev/null
+++ b/src/parallels/parallels_driver.c
@@ -0,0 +1,287 @@
+/*
+ * parallels_driver.c: core driver functions for managing
+ * Parallels Cloud Server hosts
+ *
+ * Copyright (C) 2012 Parallels, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+
+#include <config.h>
+
+#include <sys/types.h>
+#include <sys/poll.h>
+#include <limits.h>
+#include <string.h>
+#include <stdio.h>
+#include <stdarg.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <errno.h>
+#include <sys/utsname.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <paths.h>
+#include <pwd.h>
+#include <stdio.h>
+#include <sys/wait.h>
+#include <sys/time.h>
+#include <sys/statvfs.h>
+
+#include "datatypes.h"
+#include "virterror_internal.h"
+#include "memory.h"
+#include "util.h"
+#include "logging.h"
+#include "command.h"
+#include "configmake.h"
+#include "storage_file.h"
+#include "nodeinfo.h"
+#include "json.h"
+#include "domain_conf.h"
+#include "storage_conf.h"
+#include "domain_event.h"
+
+#include "parallels_driver.h"
+
+#define VIR_FROM_THIS VIR_FROM_PARALLELS
+
+#define PRLCTL "prlctl"
+#define PARALLELS_DEFAULT_ARCH "x86_64"
+
+struct _parallelsConn {
+ virMutex lock;
+ virDomainObjList domains;
+ virStoragePoolObjList pools;
+ virCapsPtr caps;
+ virDomainEventStatePtr domainEventState;
+};
+
+typedef struct _parallelsConn parallelsConn;
+typedef struct _parallelsConn *parallelsConnPtr;
+
+static int parallelsClose(virConnectPtr conn);
+
+static void
+parallelsDriverLock(parallelsConnPtr driver)
+{
+ virMutexLock(&driver->lock);
+}
+
+static void
+parallelsDriverUnlock(parallelsConnPtr driver)
+{
+ virMutexUnlock(&driver->lock);
+}
+
+static int
+parallelsDefaultConsoleType(const char *ostype ATTRIBUTE_UNUSED)
+{
+ return VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_SERIAL;
+}
+
+static virCapsPtr
+parallelsBuildCapabilities(void)
+{
+ virCapsPtr caps;
+ virCapsGuestPtr guest;
+ struct utsname utsname;
+ uname(&utsname);
+
+ if ((caps = virCapabilitiesNew(utsname.machine, 0, 0)) == NULL)
+ goto no_memory;
+
+ if (nodeCapsInitNUMA(caps) < 0)
+ goto no_memory;
+
+ virCapabilitiesSetMacPrefix(caps, (unsigned char[]) {
+ 0x42, 0x1C, 0x00});
+
+ if ((guest = virCapabilitiesAddGuest(caps, "hvm", PARALLELS_DEFAULT_ARCH,
+ 64, "parallels",
+ NULL, 0, NULL)) == NULL)
+ goto no_memory;
+
+ if (virCapabilitiesAddGuestDomain(guest,
+ "parallels", NULL, NULL, 0, NULL) == NULL)
+ goto no_memory;
+
+ caps->defaultConsoleTargetType = parallelsDefaultConsoleType;
+ return caps;
+
+ no_memory:
+ virReportOOMError();
+ virCapabilitiesFree(caps);
+ return NULL;
+}
+
+static char *
+parallelsGetCapabilities(virConnectPtr conn)
+{
+ parallelsConnPtr privconn = conn->privateData;
+ char *xml;
+
+ parallelsDriverLock(privconn);
+ if ((xml = virCapabilitiesFormatXML(privconn->caps)) == NULL)
+ virReportOOMError();
+ parallelsDriverUnlock(privconn);
+ return xml;
+}
+
+static int
+parallelsOpenDefault(virConnectPtr conn)
+{
+ parallelsConnPtr privconn;
+
+ if (VIR_ALLOC(privconn) < 0) {
+ virReportOOMError();
+ return VIR_DRV_OPEN_ERROR;
+ }
+ if (virMutexInit(&privconn->lock) < 0) {
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("cannot initialize mutex"));
+ goto error;
+ }
+
+ if (!(privconn->caps = parallelsBuildCapabilities()))
+ goto error;
+
+ if (virDomainObjListInit(&privconn->domains) < 0)
+ goto error;
+
+ conn->privateData = privconn;
+
+ return VIR_DRV_OPEN_SUCCESS;
+
+ error:
+ virDomainObjListDeinit(&privconn->domains);
+ virCapabilitiesFree(privconn->caps);
+ virStoragePoolObjListFree(&privconn->pools);
+ VIR_FREE(privconn);
+ return VIR_DRV_OPEN_ERROR;
+}
+
+static virDrvOpenStatus
+parallelsOpen(virConnectPtr conn,
+ virConnectAuthPtr auth ATTRIBUTE_UNUSED,
+ unsigned int flags)
+{
+ int ret;
+ parallelsConnPtr privconn;
+ virCheckFlags(VIR_CONNECT_RO, VIR_DRV_OPEN_ERROR);
+
+ if (!conn->uri)
+ return VIR_DRV_OPEN_DECLINED;
+
+ if (!conn->uri->scheme || STRNEQ(conn->uri->scheme, "parallels"))
+ return VIR_DRV_OPEN_DECLINED;
+
+ /* Remote driver should handle these. */
+ if (conn->uri->server)
+ return VIR_DRV_OPEN_DECLINED;
+
+ /* From this point on, the connection is for us. */
+ if (!conn->uri->path ||
+ conn->uri->path[0] == '\0' ||
+ (conn->uri->path[0] == '/' && conn->uri->path[1] == '\0')) {
+ virReportError(VIR_ERR_INVALID_ARG, "%s",
+ _("parallelsOpen: supply a path or use "
+ "parallels:///default"));
+ return VIR_DRV_OPEN_ERROR;
+ }
+
+ if (STREQ(conn->uri->path, "/default"))
+ ret = parallelsOpenDefault(conn);
+ else
+ return VIR_DRV_OPEN_DECLINED;
+
+ if (ret != VIR_DRV_OPEN_SUCCESS)
+ return ret;
+
+ privconn = conn->privateData;
+ parallelsDriverLock(privconn);
+ privconn->domainEventState = virDomainEventStateNew();
+ if (!privconn->domainEventState) {
+ parallelsDriverUnlock(privconn);
+ parallelsClose(conn);
+ return VIR_DRV_OPEN_ERROR;
+ }
+
+ parallelsDriverUnlock(privconn);
+ return VIR_DRV_OPEN_SUCCESS;
+}
+
+static int
+parallelsClose(virConnectPtr conn)
+{
+ parallelsConnPtr privconn = conn->privateData;
+
+ parallelsDriverLock(privconn);
+ virCapabilitiesFree(privconn->caps);
+ virDomainObjListDeinit(&privconn->domains);
+ virDomainEventStateFree(privconn->domainEventState);
+ conn->privateData = NULL;
+
+ parallelsDriverUnlock(privconn);
+ virMutexDestroy(&privconn->lock);
+
+ VIR_FREE(privconn);
+ return 0;
+}
+
+static int
+parallelsGetVersion(virConnectPtr conn ATTRIBUTE_UNUSED, unsigned long *hvVer)
+{
+ /* TODO */
+ *hvVer = 6;
+ return 0;
+}
+
+static virDriver parallelsDriver = {
+ .no = VIR_DRV_PARALLELS,
+ .name = "Parallels",
+ .open = parallelsOpen, /* 0.10.0 */
+ .close = parallelsClose, /* 0.10.0 */
+ .version = parallelsGetVersion, /* 0.10.0 */
+ .getHostname = virGetHostname, /* 0.10.0 */
+ .nodeGetInfo = nodeGetInfo, /* 0.10.0 */
+ .getCapabilities = parallelsGetCapabilities, /* 0.10.0 */
+};
+
+/**
+ * parallelsRegister:
+ *
+ * Registers the parallels driver
+ */
+int
+parallelsRegister(void)
+{
+ char *prlctl_path;
+
+ prlctl_path = virFindFileInPath(PRLCTL);
+ if (!prlctl_path) {
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("Can't find prlctl command in the PATH env"));
+ return VIR_DRV_OPEN_ERROR;
+ }
+
+ VIR_FREE(prlctl_path);
+
+ if (virRegisterDriver(¶llelsDriver) < 0)
+ return -1;
+
+ return 0;
+}
diff --git a/src/parallels/parallels_driver.h b/src/parallels/parallels_driver.h
new file mode 100644
index 0000000..0a021c9
--- /dev/null
+++ b/src/parallels/parallels_driver.h
@@ -0,0 +1,28 @@
+/*
+ * parallels_driver.c: core driver functions for managing
+ * Parallels Cloud Server hosts
+ *
+ * Copyright (C) 2012 Parallels, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+
+#ifndef PARALLELS_DRIVER_H
+# define PARALLELS_DRIVER_H
+
+int parallelsRegister(void);
+
+#endif
diff --git a/src/util/virterror.c b/src/util/virterror.c
index b5c6853..8cf738a 100644
--- a/src/util/virterror.c
+++ b/src/util/virterror.c
@@ -99,7 +99,8 @@ VIR_ENUM_IMPL(virErrorDomain, VIR_ERR_DOMAIN_LAST,
"URI Utils", /* 45 */
"Authentication Utils",
- "DBus Utils"
+ "DBus Utils",
+ "Parallels Cloud Server"
)
--
1.7.1
2
18
[libvirt] [PATCH] maint: Use consistent copyright.
by [4mWho should the emails appear to be from? [Osier Yang 27 Jul '12
by [4mWho should the emails appear to be from? [Osier Yang 27 Jul '12
27 Jul '12
From: Osier Yang <jyang(a)redhat.com>
This is a follow up patch of commit f9ce7dad6, it modifies all
the files which declare the copyright like "See COPYING.LIB for
the License of this software" to use the detailed/consistent one.
And deserts the outdated comments like:
* libvirt-qemu.h:
* Summary: qemu specific interfaces
* Description: Provides the interfaces of the libvirt library to handle
* qemu specific methods
*
* Copy: Copyright (C) 2010, 2012 Red Hat, Inc.
Uses the more compact style like:
* libvirt-qemu.h: Interfaces specific for QEMU/KVM driver
*
* Copyright (C) 2010, 2012 Red Hat, Inc.
---
include/libvirt/libvirt-qemu.h | 21 +++++++++++++++------
include/libvirt/libvirt.h.in | 21 +++++++++++++++------
include/libvirt/virterror.h | 21 +++++++++++++++------
src/libvirt.c | 14 +++++++++++++-
src/security/virt-aa-helper.c | 14 +++++++++++++-
src/util/buf.c | 14 +++++++++++++-
src/util/buf.h | 14 +++++++++++++-
src/util/cgroup.c | 14 +++++++++++++-
src/util/cgroup.h | 14 +++++++++++++-
src/util/conf.c | 14 +++++++++++++-
src/util/conf.h | 14 +++++++++++++-
src/util/stats_linux.c | 14 +++++++++++++-
src/util/stats_linux.h | 14 +++++++++++++-
src/util/virterror.c | 16 ++++++++++++++--
src/util/viruri.c | 14 +++++++++++++-
src/util/viruri.h | 14 +++++++++++++-
src/util/xml.c | 14 +++++++++++++-
src/xen/block_stats.c | 14 +++++++++++++-
src/xen/block_stats.h | 14 +++++++++++++-
src/xen/xen_driver.c | 14 +++++++++++++-
src/xen/xen_driver.h | 14 +++++++++++++-
src/xen/xen_hypervisor.c | 14 +++++++++++++-
src/xen/xen_hypervisor.h | 14 +++++++++++++-
src/xen/xs_internal.c | 14 +++++++++++++-
src/xen/xs_internal.h | 14 +++++++++++++-
tests/testutils.c | 14 +++++++++++++-
tests/testutils.h | 14 +++++++++++++-
tools/virsh-edit.c | 14 +++++++++++++-
tools/virsh.c | 14 +++++++++++++-
29 files changed, 384 insertions(+), 45 deletions(-)
diff --git a/include/libvirt/libvirt-qemu.h b/include/libvirt/libvirt-qemu.h
index ba75ae3..6f4aedc 100644
--- a/include/libvirt/libvirt-qemu.h
+++ b/include/libvirt/libvirt-qemu.h
@@ -1,12 +1,21 @@
/* -*- c -*-
- * libvirt-qemu.h:
- * Summary: qemu specific interfaces
- * Description: Provides the interfaces of the libvirt library to handle
- * qemu specific methods
+ * libvirt-qemu.h: Interfaces specific for QEMU/KVM driver
*
- * Copy: Copyright (C) 2010, 2012 Red Hat, Inc.
+ * Copyright (C) 2010, 2012 Red Hat, Inc.
*
- * See COPYING.LIB for the License of this software
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; If not, see
+ * <http://www.gnu.org/licenses/>.
*
* Author: Chris Lalancette <clalance(a)redhat.com>
*/
diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in
index fcef461..fc7fa85 100644
--- a/include/libvirt/libvirt.h.in
+++ b/include/libvirt/libvirt.h.in
@@ -1,12 +1,21 @@
/* -*- c -*-
- * libvirt.h:
- * Summary: core interfaces for the libvirt library
- * Description: Provides the interfaces of the libvirt library to handle
- * virtualized domains
+ * libvirt.h: Core interfaces for the libvirt library
*
- * Copy: Copyright (C) 2005-2006, 2010-2012 Red Hat, Inc.
+ * Copyright (C) 2005-2006, 2010-2012 Red Hat, Inc.
*
- * See COPYING.LIB for the License of this software
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; If not, see
+ * <http://www.gnu.org/licenses/>.
*
* Author: Daniel Veillard <veillard(a)redhat.com>
*/
diff --git a/include/libvirt/virterror.h b/include/libvirt/virterror.h
index 0e0bc9c..b3f80ab 100644
--- a/include/libvirt/virterror.h
+++ b/include/libvirt/virterror.h
@@ -1,12 +1,21 @@
/*
- * virterror.h:
- * Summary: error handling interfaces for the libvirt library
- * Description: Provides the interfaces of the libvirt library to handle
- * errors raised while using the library.
+ * virterror.h: Error handling interfaces for the libvirt library
*
- * Copy: Copyright (C) 2006, 2010-2012 Red Hat, Inc.
+ * Copyright (C) 2006, 2010-2012 Red Hat, Inc.
*
- * See COPYING.LIB for the License of this software
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; If not, see
+ * <http://www.gnu.org/licenses/>.
*
* Author: Daniel Veillard <veillard(a)redhat.com>
*/
diff --git a/src/libvirt.c b/src/libvirt.c
index 8315b4f..de22d81 100644
--- a/src/libvirt.c
+++ b/src/libvirt.c
@@ -4,7 +4,19 @@
*
* Copyright (C) 2005-2006, 2008-2012 Red Hat, Inc.
*
- * See COPYING.LIB for the License of this software
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; If not, see
+ * <http://www.gnu.org/licenses/>.
*
* Daniel Veillard <veillard(a)redhat.com>
*/
diff --git a/src/security/virt-aa-helper.c b/src/security/virt-aa-helper.c
index 056362c..5352a4a 100644
--- a/src/security/virt-aa-helper.c
+++ b/src/security/virt-aa-helper.c
@@ -5,7 +5,19 @@
* Copyright (C) 2010-2012 Red Hat, Inc.
* Copyright (C) 2009-2011 Canonical Ltd.
*
- * See COPYING.LIB for the License of this software
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; If not, see
+ * <http://www.gnu.org/licenses/>.
*
* Author:
* Jamie Strandboge <jamie(a)canonical.com>
diff --git a/src/util/buf.c b/src/util/buf.c
index 6c7c501..a7e5bd4 100644
--- a/src/util/buf.c
+++ b/src/util/buf.c
@@ -3,7 +3,19 @@
*
* Copyright (C) 2005-2008, 2010-2012 Red Hat, Inc.
*
- * See COPYING.LIB for the License of this software
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; If not, see
+ * <http://www.gnu.org/licenses/>.
*
* Daniel Veillard <veillard(a)redhat.com>
*/
diff --git a/src/util/buf.h b/src/util/buf.h
index 2750b17..c58f1d7 100644
--- a/src/util/buf.h
+++ b/src/util/buf.h
@@ -3,7 +3,19 @@
*
* Copyright (C) 2005-2008, 2011, 2012 Red Hat, Inc.
*
- * See COPYING.LIB for the License of this software
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; If not, see
+ * <http://www.gnu.org/licenses/>.
*
* Daniel Veillard <veillard(a)redhat.com>
*/
diff --git a/src/util/cgroup.c b/src/util/cgroup.c
index 5b32881..6c29c87 100644
--- a/src/util/cgroup.c
+++ b/src/util/cgroup.c
@@ -4,7 +4,19 @@
* Copyright (C) 2010-2012 Red Hat, Inc.
* Copyright IBM Corp. 2008
*
- * See COPYING.LIB for the License of this software
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; If not, see
+ * <http://www.gnu.org/licenses/>.
*
* Authors:
* Dan Smith <danms(a)us.ibm.com>
diff --git a/src/util/cgroup.h b/src/util/cgroup.h
index 05325ae..265f7c9 100644
--- a/src/util/cgroup.h
+++ b/src/util/cgroup.h
@@ -4,7 +4,19 @@
* Copyright (C) 2011-2012 Red Hat, Inc.
* Copyright IBM Corp. 2008
*
- * See COPYING.LIB for the License of this software
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; If not, see
+ * <http://www.gnu.org/licenses/>.
*
* Authors:
* Dan Smith <danms(a)us.ibm.com>
diff --git a/src/util/conf.c b/src/util/conf.c
index b9392f7..8c1a963 100644
--- a/src/util/conf.c
+++ b/src/util/conf.c
@@ -3,7 +3,19 @@
*
* Copyright (C) 2006-2012 Red Hat, Inc.
*
- * See COPYING.LIB for the License of this software
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; If not, see
+ * <http://www.gnu.org/licenses/>.
*
* Daniel Veillard <veillard(a)redhat.com>
*/
diff --git a/src/util/conf.h b/src/util/conf.h
index e7d470d..6af2377 100644
--- a/src/util/conf.h
+++ b/src/util/conf.h
@@ -3,7 +3,19 @@
*
* Copyright (C) 2006, 2007 Red Hat, Inc.
*
- * See COPYING.LIB for the License of this software
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; If not, see
+ * <http://www.gnu.org/licenses/>.
*
* Daniel Veillard <veillard(a)redhat.com>
*/
diff --git a/src/util/stats_linux.c b/src/util/stats_linux.c
index a74ed6a..2a1c6ee 100644
--- a/src/util/stats_linux.c
+++ b/src/util/stats_linux.c
@@ -3,7 +3,19 @@
*
* Copyright (C) 2007-2010 Red Hat, Inc.
*
- * See COPYING.LIB for the License of this software
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; If not, see
+ * <http://www.gnu.org/licenses/>.
*
* Richard W.M. Jones <rjones(a)redhat.com>
*/
diff --git a/src/util/stats_linux.h b/src/util/stats_linux.h
index 0aff832..73aeb5f 100644
--- a/src/util/stats_linux.h
+++ b/src/util/stats_linux.h
@@ -3,7 +3,19 @@
*
* Copyright (C) 2007 Red Hat, Inc.
*
- * See COPYING.LIB for the License of this software
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; If not, see
+ * <http://www.gnu.org/licenses/>.
*
* Richard W.M. Jones <rjones(a)redhat.com>
*/
diff --git a/src/util/virterror.c b/src/util/virterror.c
index b5c6853..74adeed 100644
--- a/src/util/virterror.c
+++ b/src/util/virterror.c
@@ -1,9 +1,21 @@
/*
* virterror.c: implements error handling and reporting code for libvirt
*
- * Copy: Copyright (C) 2006, 2008-2012 Red Hat, Inc.
+ * Copyright (C) 2006, 2008-2012 Red Hat, Inc.
*
- * See COPYING.LIB for the License of this software
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; If not, see
+ * <http://www.gnu.org/licenses/>.
*
* Author: Daniel Veillard <veillard(a)redhat.com>
*/
diff --git a/src/util/viruri.c b/src/util/viruri.c
index 791a412..1cbfbc1 100644
--- a/src/util/viruri.c
+++ b/src/util/viruri.c
@@ -3,7 +3,19 @@
*
* Copyright (C) 2012 Red Hat, Inc.
*
- * See COPYING.LIB for the License of this software
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; If not, see
+ * <http://www.gnu.org/licenses/>.
*/
#include <config.h>
diff --git a/src/util/viruri.h b/src/util/viruri.h
index 79a5668..571bf3c 100644
--- a/src/util/viruri.h
+++ b/src/util/viruri.h
@@ -3,7 +3,19 @@
*
* Copyright (C) 2012 Red Hat, Inc.
*
- * See COPYING.LIB for the License of this software
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; If not, see
+ * <http://www.gnu.org/licenses/>.
*/
#ifndef __VIR_URI_H__
diff --git a/src/util/xml.c b/src/util/xml.c
index 4c88a06..b093d5f 100644
--- a/src/util/xml.c
+++ b/src/util/xml.c
@@ -3,7 +3,19 @@
*
* Copyright (C) 2005, 2007-2012 Red Hat, Inc.
*
- * See COPYING.LIB for the License of this software
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; If not, see
+ * <http://www.gnu.org/licenses/>.
*
* Daniel Veillard <veillard(a)redhat.com>
*/
diff --git a/src/xen/block_stats.c b/src/xen/block_stats.c
index 3d77720..b42666e 100644
--- a/src/xen/block_stats.c
+++ b/src/xen/block_stats.c
@@ -3,7 +3,19 @@
*
* Copyright (C) 2007-2009 Red Hat, Inc.
*
- * See COPYING.LIB for the License of this software
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; If not, see
+ * <http://www.gnu.org/licenses/>.
*
* Richard W.M. Jones <rjones(a)redhat.com>
*/
diff --git a/src/xen/block_stats.h b/src/xen/block_stats.h
index c94f645..5eecc6e 100644
--- a/src/xen/block_stats.h
+++ b/src/xen/block_stats.h
@@ -3,7 +3,19 @@
*
* Copyright (C) 2007 Red Hat, Inc.
*
- * See COPYING.LIB for the License of this software
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; If not, see
+ * <http://www.gnu.org/licenses/>.
*
* Richard W.M. Jones <rjones(a)redhat.com>
*/
diff --git a/src/xen/xen_driver.c b/src/xen/xen_driver.c
index f01ce16..d33737e 100644
--- a/src/xen/xen_driver.c
+++ b/src/xen/xen_driver.c
@@ -3,7 +3,19 @@
*
* Copyright (C) 2007-2012 Red Hat, Inc.
*
- * See COPYING.LIB for the License of this software
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; If not, see
+ * <http://www.gnu.org/licenses/>.
*
* Richard W.M. Jones <rjones(a)redhat.com>
*/
diff --git a/src/xen/xen_driver.h b/src/xen/xen_driver.h
index 3cefea3..0b3138a 100644
--- a/src/xen/xen_driver.h
+++ b/src/xen/xen_driver.h
@@ -3,7 +3,19 @@
*
* Copyright (C) 2007, 2010-2011 Red Hat, Inc.
*
- * See COPYING.LIB for the License of this software
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; If not, see
+ * <http://www.gnu.org/licenses/>.
*
* Richard W.M. Jones <rjones(a)redhat.com>
*/
diff --git a/src/xen/xen_hypervisor.c b/src/xen/xen_hypervisor.c
index 986621a..86e0514 100644
--- a/src/xen/xen_hypervisor.c
+++ b/src/xen/xen_hypervisor.c
@@ -3,7 +3,19 @@
*
* Copyright (C) 2005-2012 Red Hat, Inc.
*
- * See COPYING.LIB for the License of this software
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; If not, see
+ * <http://www.gnu.org/licenses/>.
*
* Daniel Veillard <veillard(a)redhat.com>
*/
diff --git a/src/xen/xen_hypervisor.h b/src/xen/xen_hypervisor.h
index 55a99f1..61434dc 100644
--- a/src/xen/xen_hypervisor.h
+++ b/src/xen/xen_hypervisor.h
@@ -3,7 +3,19 @@
*
* Copyright (C) 2005, 2010-2011 Red Hat, Inc.
*
- * See COPYING.LIB for the License of this software
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; If not, see
+ * <http://www.gnu.org/licenses/>.
*
* Daniel Veillard <veillard(a)redhat.com>
*/
diff --git a/src/xen/xs_internal.c b/src/xen/xs_internal.c
index 8f52e8f..e56d1a4 100644
--- a/src/xen/xs_internal.c
+++ b/src/xen/xs_internal.c
@@ -3,7 +3,19 @@
*
* Copyright (C) 2006, 2009-2012 Red Hat, Inc.
*
- * See COPYING.LIB for the License of this software
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; If not, see
+ * <http://www.gnu.org/licenses/>.
*
* Daniel Veillard <veillard(a)redhat.com>
*/
diff --git a/src/xen/xs_internal.h b/src/xen/xs_internal.h
index 1ada0f3..b9438ea 100644
--- a/src/xen/xs_internal.h
+++ b/src/xen/xs_internal.h
@@ -3,7 +3,19 @@
*
* Copyright (C) 2006, 2010-2012 Red Hat, Inc.
*
- * See COPYING.LIB for the License of this software
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; If not, see
+ * <http://www.gnu.org/licenses/>.
*
* Daniel Veillard <veillard(a)redhat.com>
*/
diff --git a/tests/testutils.c b/tests/testutils.c
index 8f2ca51..171321f 100644
--- a/tests/testutils.c
+++ b/tests/testutils.c
@@ -3,7 +3,19 @@
*
* Copyright (C) 2005-2012 Red Hat, Inc.
*
- * See COPYING.LIB for the License of this software
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; If not, see
+ * <http://www.gnu.org/licenses/>.
*
* Karel Zak <kzak(a)redhat.com>
*/
diff --git a/tests/testutils.h b/tests/testutils.h
index f8c7567..f372c23 100644
--- a/tests/testutils.h
+++ b/tests/testutils.h
@@ -3,7 +3,19 @@
*
* Copyright (C) 2005, 2008-2012 Red Hat, Inc.
*
- * See COPYING.LIB for the License of this software
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; If not, see
+ * <http://www.gnu.org/licenses/>.
*
* Karel Zak <kzak(a)redhat.com>
*/
diff --git a/tools/virsh-edit.c b/tools/virsh-edit.c
index 27140e2..4dea4b8 100644
--- a/tools/virsh-edit.c
+++ b/tools/virsh-edit.c
@@ -3,7 +3,19 @@
*
* Copyright (C) 2012 Red Hat, Inc.
*
- * See COPYING.LIB for the License of this software.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; If not, see
+ * <http://www.gnu.org/licenses/>.
*
* Usage:
* Define macros:
diff --git a/tools/virsh.c b/tools/virsh.c
index 5658796..8de0518 100644
--- a/tools/virsh.c
+++ b/tools/virsh.c
@@ -3,7 +3,19 @@
*
* Copyright (C) 2005, 2007-2012 Red Hat, Inc.
*
- * See COPYING.LIB for the License of this software
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; If not, see
+ * <http://www.gnu.org/licenses/>.
*
* Daniel Veillard <veillard(a)redhat.com>
* Karel Zak <kzak(a)redhat.com>
--
1.7.7.3
3
2
There are conflicts after splitting 2/11 and 3/11, so post the whole
set again.
v1 - v2:
* split 2/11, and 3/11 for the patches were too big. However, the new
3/13 is still quite big. I will send it individualy after compression.
This splits virsh.c by the command groups, except 'virsh itself' group,
each group will have a separate .c, filled with the its commands, a
few helpers, and command group definition moved from virsh.c. and virsh.c
simply include those new .c files.
It still could be optimized, but this set could set up the skelton, and
further optimization could be later patches.
Osier Yang (13):
virsh: Move definition of cmds and cmd groups right at the top of
main
virsh: Split cmds for domain monitoring from virsh.c
virsh: Split cmds of domain group from virsh.c
virsh: Split cmds of storage volume group from virsh.c
virsh: Split cmds of storage pool group from virsh.c
virsh: Split cmds to manage network from virsh.c
virsh: Split cmds to manage host interface from virsh.c
virsh: Split cmds to manage network filter from virsh.c
virsh: Split cmds to manage secret from virsh.c
virsh: Split cmds to manage domain snapshot from virsh.c
virsh: Split cmds in host group from virsh.c
virsh: Split cmds in node device group from virsh.c
virsh: Move command group definition into its own file
tools/virsh-domain-monitor.c | 1701 ++++
tools/virsh-domain.c | 8139 +++++++++++++++++++
tools/virsh-host.c | 839 ++
tools/virsh-interface.c | 1032 +++
tools/virsh-network.c | 710 ++
tools/virsh-nodedev.c | 402 +
tools/virsh-nwfilter.c | 324 +
tools/virsh-pool.c | 1442 ++++
tools/virsh-secret.c | 373 +
tools/virsh-snapshot.c | 1628 ++++
tools/virsh-volume.c | 1462 ++++
tools/virsh.c |18474 +-----------------------------------------
12 files changed, 18361 insertions(+), 18165 deletions(-)
create mode 100644 tools/virsh-domain-monitor.c
create mode 100644 tools/virsh-domain.c
create mode 100644 tools/virsh-host.c
create mode 100644 tools/virsh-interface.c
create mode 100644 tools/virsh-network.c
create mode 100644 tools/virsh-nodedev.c
create mode 100644 tools/virsh-nwfilter.c
create mode 100644 tools/virsh-pool.c
create mode 100644 tools/virsh-secret.c
create mode 100644 tools/virsh-snapshot.c
create mode 100644 tools/virsh-volume.c
Regards,
Osier
5
35
[libvirt] [PATCHv2 0/2] Refactor and fix error resetting on fallback paths in virsh
by Peter Krempa 27 Jul '12
by Peter Krempa 27 Jul '12
27 Jul '12
This series fixes places where errors were not reset correctly and adds a
function for resetting libvirt errors in virsh that simplifies this operation.
v2 is a rebase of the previous version as it conflicted with the rewrite of
cmdUndefine.
Peter Krempa (2):
virsh: Refactor error clearing on graceful fallback paths
virsh: Fix error resetting on fallback paths
tools/virsh-domain-monitor.c | 16 ++++++----------
tools/virsh-domain.c | 36 ++++++++++++------------------------
tools/virsh-network.c | 3 +--
tools/virsh-pool.c | 3 +--
tools/virsh-snapshot.c | 19 +++++++------------
tools/virsh.c | 13 +++++++++++--
6 files changed, 38 insertions(+), 52 deletions(-)
--
1.7.8.6
2
5
Any time we have a string with no % passed through gettext, a
translator can inject a % to cause a stack overread. When there
is nothing to format, it's easier to ask for a string that cannot
be used as a formatter, by using a trivial "%s" format instead.
In the past, we have used --disable-nls to catch some of the
offenders, but that doesn't get run very often, and many more
uses have crept in. Syntax check to the rescue!
The syntax check can catch uses such as
virReportError(code,
_("split "
"string"));
by using a sed script to fold context lines into one pattern
space before checking for a string without %.
This patch is just mechanical insertion of %s; there are probably
several messages touched by this patch where we would be better
off giving the user more information than a fixed string.
* cfg.mk (sc_prohibit_diagnostic_without_format): New rule.
* src/datatypes.c (virUnrefConnect, virGetDomain)
(virUnrefDomain, virGetNetwork, virUnrefNetwork, virGetInterface)
(virUnrefInterface, virGetStoragePool, virUnrefStoragePool)
(virGetStorageVol, virUnrefStorageVol, virGetNodeDevice)
(virGetSecret, virUnrefSecret, virGetNWFilter, virUnrefNWFilter)
(virGetDomainSnapshot, virUnrefDomainSnapshot): Add %s wrapper.
* src/lxc/lxc_driver.c (lxcDomainSetBlkioParameters)
(lxcDomainGetBlkioParameters): Likewise.
* src/conf/domain_conf.c (virSecurityDeviceLabelDefParseXML)
(virDomainDiskDefParseXML, virDomainGraphicsDefParseXML):
Likewise.
* src/conf/network_conf.c (virNetworkDNSHostsDefParseXML)
(virNetworkDefParseXML): Likewise.
* src/conf/nwfilter_conf.c (virNWFilterIsValidChainName):
Likewise.
* src/conf/nwfilter_params.c (virNWFilterVarValueCreateSimple)
(virNWFilterVarAccessParse): Likewise.
* src/libvirt.c (virDomainSave, virDomainSaveFlags)
(virDomainRestore, virDomainRestoreFlags)
(virDomainSaveImageGetXMLDesc, virDomainSaveImageDefineXML)
(virDomainCoreDump, virDomainGetXMLDesc)
(virDomainMigrateVersion1, virDomainMigrateVersion2)
(virDomainMigrateVersion3, virDomainMigrate, virDomainMigrate2)
(virStreamSendAll, virStreamRecvAll)
(virDomainSnapshotGetXMLDesc): Likewise.
* src/nwfilter/nwfilter_dhcpsnoop.c (virNWFilterSnoopReqLeaseDel)
(virNWFilterDHCPSnoopReq): Likewise.
* src/openvz/openvz_driver.c (openvzUpdateDevice): Likewise.
* src/openvz/openvz_util.c (openvzKBPerPages): Likewise.
* src/qemu/qemu_cgroup.c (qemuSetupCgroup): Likewise.
* src/qemu/qemu_command.c (qemuBuildHubDevStr, qemuBuildChrChardevStr)
(qemuBuildCommandLine): Likewise.
* src/qemu/qemu_driver.c (qemuDomainGetPercpuStats): Likewise.
* src/qemu/qemu_hotplug.c (qemuDomainAttachNetDevice): Likewise.
* src/rpc/virnetsaslcontext.c (virNetSASLSessionGetIdentity):
Likewise.
* src/rpc/virnetsocket.c (virNetSocketNewConnectUNIX)
(virNetSocketSendFD, virNetSocketRecvFD): Likewise.
* src/storage/storage_backend_disk.c
(virStorageBackendDiskBuildPool): Likewise.
* src/storage/storage_backend_fs.c
(virStorageBackendFileSystemProbe)
(virStorageBackendFileSystemBuild): Likewise.
* src/storage/storage_backend_rbd.c
(virStorageBackendRBDOpenRADOSConn): Likewise.
* src/storage/storage_driver.c (storageVolumeResize): Likewise.
* src/test/test_driver.c (testInterfaceChangeBegin)
(testInterfaceChangeCommit, testInterfaceChangeRollback):
Likewise.
* src/vbox/vbox_tmpl.c (vboxListAllDomains): Likewise.
* src/xenxs/xen_sxpr.c (xenFormatSxprDisk, xenFormatSxpr):
Likewise.
* src/xenxs/xen_xm.c (xenXMConfigGetUUID, xenFormatXMDisk)
(xenFormatXM): Likewise.
---
danpb asked me on IRC if it was possible to automate the checking
for our recent %s additions. Of course, my answer was yes, before
I knew it would take me three hours to get here...
cfg.mk | 15 ++++++++++++-
src/conf/domain_conf.c | 22 +++++++++----------
src/conf/network_conf.c | 8 +++----
src/conf/nwfilter_conf.c | 4 ++--
src/conf/nwfilter_params.c | 8 +++----
src/datatypes.c | 41 +++++++++++++++++++-----------------
src/libvirt.c | 34 +++++++++++++++---------------
src/lxc/lxc_driver.c | 6 ++++--
src/nwfilter/nwfilter_dhcpsnoop.c | 5 +++--
src/openvz/openvz_driver.c | 2 +-
src/openvz/openvz_util.c | 2 +-
src/qemu/qemu_cgroup.c | 4 ++--
src/qemu/qemu_command.c | 8 +++----
src/qemu/qemu_driver.c | 2 +-
src/qemu/qemu_hotplug.c | 2 +-
src/rpc/virnetsaslcontext.c | 4 ++--
src/rpc/virnetsocket.c | 6 +++---
src/storage/storage_backend_disk.c | 8 +++----
src/storage/storage_backend_fs.c | 8 +++----
src/storage/storage_backend_rbd.c | 8 +++----
src/storage/storage_driver.c | 10 ++++-----
src/test/test_driver.c | 6 +++---
src/vbox/vbox_tmpl.c | 2 +-
src/xenxs/xen_sxpr.c | 6 +++---
src/xenxs/xen_xm.c | 8 +++----
25 files changed, 124 insertions(+), 105 deletions(-)
diff --git a/cfg.mk b/cfg.mk
index d054e5a..085ef34 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -547,7 +547,7 @@ msg_gen_function += xenapiSessionErrorHandler
# msg_gen_function += vshPrint
# msg_gen_function += vshError
-func_or := $(shell printf '$(msg_gen_function)'|tr -s '[[:space:]]' '|')
+func_or := $(shell echo $(msg_gen_function)|tr -s '[[:space:]]' '|')
func_re := ($(func_or))
# Look for diagnostics that aren't marked for translation.
@@ -567,6 +567,19 @@ sc_libvirt_unmarked_diagnostics:
{ echo '$(ME): found unmarked diagnostic(s)' 1>&2; \
exit 1; } || :
+# Look for diagnostics that lack a % in the format string, except that we
+# allow VIR_ERROR to do this, and ignore functions that take a single
+# string rather than a format argument.
+sc_prohibit_diagnostic_without_format:
+ @{ grep -nE '\<$(func_re) *\(.*;$$' $$($(VC_LIST_EXCEPT)); \
+ grep -A2 -nE '\<$(func_re) *\(.*,$$' $$($(VC_LIST_EXCEPT)); } \
+ | sed -rn -e ':l; /[,"]$$/ {N;b l;}' \
+ -e '/xenapiSessionErrorHandler/d' \
+ -e '/\<$(func_re) *\([^"]*"([^%"]|"\n[^"]*")*"[,)]/p' \
+ | grep -vE '(VIR_ERROR|vah_(error|warning))' && \
+ { echo '$(ME): found diagnostic without %' 1>&2; \
+ exit 1; } || :
+
# Like the above, but prohibit a newline at the end of a diagnostic.
# This is subject to false positives partly because it naively looks for
# `\n"', which may not be the end of the string, and also because it takes
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 1b5dad9..c92c6d4 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -3236,7 +3236,7 @@ virSecurityDeviceLabelDefParseXML(virSecurityDeviceLabelDefPtr *def,
(*def)->label = p;
if ((*def)->label && (*def)->norelabel) {
- virReportError(VIR_ERR_XML_ERROR,
+ virReportError(VIR_ERR_XML_ERROR, "%s",
_("Cannot specify a label if relabelling is turned off"));
VIR_FREE((*def)->label);
VIR_FREE(*def);
@@ -3423,7 +3423,7 @@ virDomainDiskDefParseXML(virCapsPtr caps,
}
if (!(source = virXMLPropString(cur, "name")) &&
def->protocol != VIR_DOMAIN_DISK_PROTOCOL_NBD) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("missing name for disk source"));
goto error;
}
@@ -3509,7 +3509,7 @@ virDomainDiskDefParseXML(virCapsPtr caps,
} else if (xmlStrEqual(cur->name, BAD_CAST "auth")) {
authUsername = virXMLPropString(cur, "username");
if (authUsername == NULL) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("missing username for auth"));
goto error;
}
@@ -3521,7 +3521,7 @@ virDomainDiskDefParseXML(virCapsPtr caps,
xmlStrEqual(child->name, BAD_CAST "secret")) {
usageType = virXMLPropString(child, "type");
if (usageType == NULL) {
- virReportError(VIR_ERR_XML_ERROR,
+ virReportError(VIR_ERR_XML_ERROR, "%s",
_("missing type for secret"));
goto error;
}
@@ -3537,7 +3537,7 @@ virDomainDiskDefParseXML(virCapsPtr caps,
authUsage = virXMLPropString(child, "usage");
if (authUUID != NULL && authUsage != NULL) {
- virReportError(VIR_ERR_XML_ERROR,
+ virReportError(VIR_ERR_XML_ERROR, "%s",
_("only one of uuid and usage can be specified"));
goto error;
}
@@ -3599,7 +3599,7 @@ virDomainDiskDefParseXML(virCapsPtr caps,
def->blkdeviotune.read_bytes_sec) ||
(def->blkdeviotune.total_bytes_sec &&
def->blkdeviotune.write_bytes_sec)) {
- virReportError(VIR_ERR_XML_ERROR,
+ virReportError(VIR_ERR_XML_ERROR, "%s",
_("total and read/write bytes_sec "
"cannot be set at the same time"));
goto error;
@@ -3609,7 +3609,7 @@ virDomainDiskDefParseXML(virCapsPtr caps,
def->blkdeviotune.read_iops_sec) ||
(def->blkdeviotune.total_iops_sec &&
def->blkdeviotune.write_iops_sec)) {
- virReportError(VIR_ERR_XML_ERROR,
+ virReportError(VIR_ERR_XML_ERROR, "%s",
_("total and read/write iops_sec "
"cannot be set at the same time"));
goto error;
@@ -3825,7 +3825,7 @@ virDomainDiskDefParseXML(virCapsPtr caps,
if (ioeventfd) {
if (def->bus != VIR_DOMAIN_DISK_BUS_VIRTIO) {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("disk ioeventfd mode supported "
"only for virtio bus"));
goto error;
@@ -3843,7 +3843,7 @@ virDomainDiskDefParseXML(virCapsPtr caps,
if (event_idx) {
if (def->bus != VIR_DOMAIN_DISK_BUS_VIRTIO) {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("disk event_idx mode supported "
"only for virtio bus"));
goto error;
@@ -6411,7 +6411,7 @@ virDomainGraphicsDefParseXML(xmlNodePtr node,
if ((compressionVal =
virDomainGraphicsSpicePlaybackCompressionTypeFromString(compression)) <= 0) {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("unknown spice playback compression"));
VIR_FREE(compression);
goto error;
@@ -6431,7 +6431,7 @@ virDomainGraphicsDefParseXML(xmlNodePtr node,
}
if ((modeVal =
virDomainGraphicsSpiceStreamingModeTypeFromString(mode)) <= 0) {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("unknown spice streaming mode"));
VIR_FREE(mode);
goto error;
diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c
index 41864be..5550c95 100644
--- a/src/conf/network_conf.c
+++ b/src/conf/network_conf.c
@@ -519,7 +519,7 @@ virNetworkDNSHostsDefParseXML(virNetworkDNSDefPtr def,
if (!(ip = virXMLPropString(node, "ip")) ||
(virSocketAddrParse(&inaddr, ip, AF_UNSPEC) < 0)) {
- virReportError(VIR_ERR_XML_DETAIL,
+ virReportError(VIR_ERR_XML_DETAIL, "%s",
_("Missing IP address in DNS host definition"));
VIR_FREE(ip);
goto error;
@@ -1086,7 +1086,7 @@ virNetworkDefParseXML(xmlXPathContextPtr ctxt)
nForwardPfs = virXPathNodeSet("./pf", ctxt, &forwardPfNodes);
if (nForwardIfs < 0 || nForwardPfs < 0) {
- virReportError(VIR_ERR_XML_ERROR,
+ virReportError(VIR_ERR_XML_ERROR, "%s",
_("No interface pool or SRIOV physical device given"));
goto error;
}
@@ -1098,7 +1098,7 @@ virNetworkDefParseXML(xmlXPathContextPtr ctxt)
}
if (forwardDev) {
- virReportError(VIR_ERR_XML_ERROR,
+ virReportError(VIR_ERR_XML_ERROR, "%s",
_("A forward Dev should not be used when using a SRIOV PF"));
goto error;
}
@@ -1116,7 +1116,7 @@ virNetworkDefParseXML(xmlXPathContextPtr ctxt)
forwardDev = NULL;
def->nForwardPfs++;
} else if (nForwardPfs > 1) {
- virReportError(VIR_ERR_XML_ERROR,
+ virReportError(VIR_ERR_XML_ERROR, "%s",
_("Use of more than one physical interface is not allowed"));
goto error;
}
diff --git a/src/conf/nwfilter_conf.c b/src/conf/nwfilter_conf.c
index 70fadaa..2b68f41 100644
--- a/src/conf/nwfilter_conf.c
+++ b/src/conf/nwfilter_conf.c
@@ -2,7 +2,7 @@
* nwfilter_conf.c: network filter XML processing
* (derived from storage_conf.c)
*
- * Copyright (C) 2006-2011 Red Hat, Inc.
+ * Copyright (C) 2006-2012 Red Hat, Inc.
* Copyright (C) 2006-2008 Daniel P. Berrange
*
* Copyright (C) 2010-2011 IBM Corporation
@@ -2423,7 +2423,7 @@ virNWFilterIsValidChainName(const char *chainname)
}
if (chainname[strspn(chainname, VALID_CHAINNAME)] != 0) {
- virReportError(VIR_ERR_INVALID_ARG,
+ virReportError(VIR_ERR_INVALID_ARG, "%s",
_("Chain name contains invalid characters"));
return false;
}
diff --git a/src/conf/nwfilter_params.c b/src/conf/nwfilter_params.c
index d08e860..6481c84 100644
--- a/src/conf/nwfilter_params.c
+++ b/src/conf/nwfilter_params.c
@@ -113,7 +113,7 @@ virNWFilterVarValueCreateSimple(char *value)
virNWFilterVarValuePtr val;
if (!isValidVarValue(value)) {
- virReportError(VIR_ERR_INVALID_ARG,
+ virReportError(VIR_ERR_INVALID_ARG, "%s",
_("Variable value contains invalid character"));
return NULL;
}
@@ -998,10 +998,10 @@ virNWFilterVarAccessParse(const char *varAccess)
}
if (parseError) {
if (dest->accessType == VIR_NWFILTER_VAR_ACCESS_ELEMENT)
- virReportError(VIR_ERR_INVALID_ARG,
+ virReportError(VIR_ERR_INVALID_ARG, "%s",
_("Malformatted array index"));
else
- virReportError(VIR_ERR_INVALID_ARG,
+ virReportError(VIR_ERR_INVALID_ARG, "%s",
_("Malformatted iterator id"));
goto err_exit;
}
@@ -1026,7 +1026,7 @@ virNWFilterVarAccessParse(const char *varAccess)
return dest;
} else {
- virReportError(VIR_ERR_INVALID_ARG,
+ virReportError(VIR_ERR_INVALID_ARG, "%s",
_("Malformatted variable"));
}
diff --git a/src/datatypes.c b/src/datatypes.c
index d718170..c5c4717 100644
--- a/src/datatypes.c
+++ b/src/datatypes.c
@@ -1,7 +1,7 @@
/*
* datatypes.h: management of structs for public data types
*
- * Copyright (C) 2006-2011 Red Hat, Inc.
+ * Copyright (C) 2006-2012 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -138,7 +138,7 @@ virUnrefConnect(virConnectPtr conn) {
int refs;
if ((!VIR_IS_CONNECT(conn))) {
- virLibConnError(VIR_ERR_INVALID_CONN, _("no connection"));
+ virLibConnError(VIR_ERR_INVALID_CONN, "%s", _("no connection"));
return -1;
}
virMutexLock(&conn->lock);
@@ -173,7 +173,7 @@ virGetDomain(virConnectPtr conn, const char *name, const unsigned char *uuid) {
char uuidstr[VIR_UUID_STRING_BUFLEN];
if (!VIR_IS_CONNECT(conn)) {
- virLibConnError(VIR_ERR_INVALID_CONN, _("no connection"));
+ virLibConnError(VIR_ERR_INVALID_CONN, "%s", _("no connection"));
return NULL;
}
virCheckNonNullArgReturn(name, NULL);
@@ -264,7 +264,8 @@ virUnrefDomain(virDomainPtr domain) {
int refs;
if (!VIR_IS_CONNECTED_DOMAIN(domain)) {
- virLibConnError(VIR_ERR_INVALID_DOMAIN, _("bad domain or no connection"));
+ virLibConnError(VIR_ERR_INVALID_DOMAIN, "%s",
+ _("bad domain or no connection"));
return -1;
}
virMutexLock(&domain->conn->lock);
@@ -300,7 +301,7 @@ virGetNetwork(virConnectPtr conn, const char *name, const unsigned char *uuid) {
char uuidstr[VIR_UUID_STRING_BUFLEN];
if (!VIR_IS_CONNECT(conn)) {
- virLibConnError(VIR_ERR_INVALID_CONN, _("no connection"));
+ virLibConnError(VIR_ERR_INVALID_CONN, "%s", _("no connection"));
return NULL;
}
virCheckNonNullArgReturn(name, NULL);
@@ -389,7 +390,7 @@ virUnrefNetwork(virNetworkPtr network) {
int refs;
if (!VIR_IS_CONNECTED_NETWORK(network)) {
- virLibConnError(VIR_ERR_INVALID_NETWORK,
+ virLibConnError(VIR_ERR_INVALID_NETWORK, "%s",
_("bad network or no connection"));
return -1;
}
@@ -427,7 +428,7 @@ virGetInterface(virConnectPtr conn, const char *name, const char *mac) {
virInterfacePtr ret = NULL;
if (!VIR_IS_CONNECT(conn)) {
- virLibConnError(VIR_ERR_INVALID_CONN, _("no connection"));
+ virLibConnError(VIR_ERR_INVALID_CONN, "%s", _("no connection"));
return NULL;
}
virCheckNonNullArgReturn(name, NULL);
@@ -522,7 +523,7 @@ virUnrefInterface(virInterfacePtr iface) {
int refs;
if (!VIR_IS_CONNECTED_INTERFACE(iface)) {
- virLibConnError(VIR_ERR_INVALID_INTERFACE,
+ virLibConnError(VIR_ERR_INVALID_INTERFACE, "%s",
_("bad interface or no connection"));
return -1;
}
@@ -561,7 +562,7 @@ virGetStoragePool(virConnectPtr conn, const char *name,
char uuidstr[VIR_UUID_STRING_BUFLEN];
if (!VIR_IS_CONNECT(conn)) {
- virLibConnError(VIR_ERR_INVALID_CONN, _("no connection"));
+ virLibConnError(VIR_ERR_INVALID_CONN, "%s", _("no connection"));
return NULL;
}
virCheckNonNullArgReturn(name, NULL);
@@ -651,7 +652,7 @@ virUnrefStoragePool(virStoragePoolPtr pool) {
int refs;
if (!VIR_IS_CONNECTED_STORAGE_POOL(pool)) {
- virLibConnError(VIR_ERR_INVALID_STORAGE_POOL,
+ virLibConnError(VIR_ERR_INVALID_STORAGE_POOL, "%s",
_("bad storage pool or no connection"));
return -1;
}
@@ -690,7 +691,7 @@ virGetStorageVol(virConnectPtr conn, const char *pool, const char *name,
virStorageVolPtr ret = NULL;
if (!VIR_IS_CONNECT(conn)) {
- virLibConnError(VIR_ERR_INVALID_CONN, _("no connection"));
+ virLibConnError(VIR_ERR_INVALID_CONN, "%s", _("no connection"));
return NULL;
}
virCheckNonNullArgReturn(name, NULL);
@@ -790,7 +791,7 @@ virUnrefStorageVol(virStorageVolPtr vol) {
int refs;
if (!VIR_IS_CONNECTED_STORAGE_VOL(vol)) {
- virLibConnError(VIR_ERR_INVALID_STORAGE_VOL,
+ virLibConnError(VIR_ERR_INVALID_STORAGE_VOL, "%s",
_("bad storage volume or no connection"));
return -1;
}
@@ -827,7 +828,7 @@ virGetNodeDevice(virConnectPtr conn, const char *name)
virNodeDevicePtr ret = NULL;
if (!VIR_IS_CONNECT(conn)) {
- virLibConnError(VIR_ERR_INVALID_CONN, _("no connection"));
+ virLibConnError(VIR_ERR_INVALID_CONN, "%s", _("no connection"));
return NULL;
}
virCheckNonNullArgReturn(name, NULL);
@@ -945,7 +946,7 @@ virGetSecret(virConnectPtr conn, const unsigned char *uuid,
char uuidstr[VIR_UUID_STRING_BUFLEN];
if (!VIR_IS_CONNECT(conn)) {
- virLibConnError(VIR_ERR_INVALID_CONN, _("no connection"));
+ virLibConnError(VIR_ERR_INVALID_CONN, "%s", _("no connection"));
return NULL;
}
virCheckNonNullArgReturn(uuid, NULL);
@@ -1031,7 +1032,8 @@ virUnrefSecret(virSecretPtr secret) {
int refs;
if (!VIR_IS_CONNECTED_SECRET(secret)) {
- virLibConnError(VIR_ERR_INVALID_SECRET, _("bad secret or no connection"));
+ virLibConnError(VIR_ERR_INVALID_SECRET, "%s",
+ _("bad secret or no connection"));
return -1;
}
virMutexLock(&secret->conn->lock);
@@ -1126,7 +1128,7 @@ virGetNWFilter(virConnectPtr conn, const char *name, const unsigned char *uuid)
char uuidstr[VIR_UUID_STRING_BUFLEN];
if (!VIR_IS_CONNECT(conn)) {
- virLibConnError(VIR_ERR_INVALID_CONN, _("no connection"));
+ virLibConnError(VIR_ERR_INVALID_CONN, "%s", _("no connection"));
return NULL;
}
virCheckNonNullArgReturn(name, NULL);
@@ -1218,7 +1220,7 @@ virUnrefNWFilter(virNWFilterPtr nwfilter)
int refs;
if (!VIR_IS_CONNECTED_NWFILTER(nwfilter)) {
- virLibConnError(VIR_ERR_INVALID_NWFILTER,
+ virLibConnError(VIR_ERR_INVALID_NWFILTER, "%s",
_("bad nwfilter or no connection"));
return -1;
}
@@ -1244,7 +1246,7 @@ virGetDomainSnapshot(virDomainPtr domain, const char *name)
virDomainSnapshotPtr ret = NULL;
if (!VIR_IS_DOMAIN(domain)) {
- virLibConnError(VIR_ERR_INVALID_DOMAIN, _("bad domain"));
+ virLibConnError(VIR_ERR_INVALID_DOMAIN, "%s", _("bad domain"));
return NULL;
}
virCheckNonNullArgReturn(name, NULL);
@@ -1307,7 +1309,8 @@ virUnrefDomainSnapshot(virDomainSnapshotPtr snapshot)
int refs;
if (!VIR_IS_DOMAIN_SNAPSHOT(snapshot)) {
- virLibConnError(VIR_ERR_INVALID_DOMAIN_SNAPSHOT, _("not a snapshot"));
+ virLibConnError(VIR_ERR_INVALID_DOMAIN_SNAPSHOT, "%s",
+ _("not a snapshot"));
return -1;
}
diff --git a/src/libvirt.c b/src/libvirt.c
index 8315b4f..1ed9e32 100644
--- a/src/libvirt.c
+++ b/src/libvirt.c
@@ -2555,7 +2555,7 @@ virDomainSave(virDomainPtr domain, const char *to)
/* We must absolutize the file path as the save is done out of process */
if (virFileAbsPath(to, &absolute_to) < 0) {
- virLibConnError(VIR_ERR_INTERNAL_ERROR,
+ virLibConnError(VIR_ERR_INTERNAL_ERROR, "%s",
_("could not build absolute output file path"));
goto error;
}
@@ -2650,7 +2650,7 @@ virDomainSaveFlags(virDomainPtr domain, const char *to,
/* We must absolutize the file path as the save is done out of process */
if (virFileAbsPath(to, &absolute_to) < 0) {
- virLibConnError(VIR_ERR_INTERNAL_ERROR,
+ virLibConnError(VIR_ERR_INTERNAL_ERROR, "%s",
_("could not build absolute output file path"));
goto error;
}
@@ -2706,7 +2706,7 @@ virDomainRestore(virConnectPtr conn, const char *from)
/* We must absolutize the file path as the restore is done out of process */
if (virFileAbsPath(from, &absolute_from) < 0) {
- virLibConnError(VIR_ERR_INTERNAL_ERROR,
+ virLibConnError(VIR_ERR_INTERNAL_ERROR, "%s",
_("could not build absolute input file path"));
goto error;
}
@@ -2788,7 +2788,7 @@ virDomainRestoreFlags(virConnectPtr conn, const char *from, const char *dxml,
/* We must absolutize the file path as the restore is done out of process */
if (virFileAbsPath(from, &absolute_from) < 0) {
- virLibConnError(VIR_ERR_INTERNAL_ERROR,
+ virLibConnError(VIR_ERR_INTERNAL_ERROR, "%s",
_("could not build absolute input file path"));
goto error;
}
@@ -2845,7 +2845,7 @@ virDomainSaveImageGetXMLDesc(virConnectPtr conn, const char *file,
virCheckNonNullArgGoto(file, error);
if ((conn->flags & VIR_CONNECT_RO) && (flags & VIR_DOMAIN_XML_SECURE)) {
- virLibConnError(VIR_ERR_OPERATION_DENIED,
+ virLibConnError(VIR_ERR_OPERATION_DENIED, "%s",
_("virDomainSaveImageGetXMLDesc with secure flag"));
goto error;
}
@@ -2856,7 +2856,7 @@ virDomainSaveImageGetXMLDesc(virConnectPtr conn, const char *file,
/* We must absolutize the file path as the read is done out of process */
if (virFileAbsPath(file, &absolute_file) < 0) {
- virLibConnError(VIR_ERR_INTERNAL_ERROR,
+ virLibConnError(VIR_ERR_INTERNAL_ERROR, "%s",
_("could not build absolute input file path"));
goto error;
}
@@ -2937,7 +2937,7 @@ virDomainSaveImageDefineXML(virConnectPtr conn, const char *file,
/* We must absolutize the file path as the read is done out of process */
if (virFileAbsPath(file, &absolute_file) < 0) {
- virLibConnError(VIR_ERR_INTERNAL_ERROR,
+ virLibConnError(VIR_ERR_INTERNAL_ERROR, "%s",
_("could not build absolute input file path"));
goto error;
}
@@ -3029,7 +3029,7 @@ virDomainCoreDump(virDomainPtr domain, const char *to, unsigned int flags)
/* We must absolutize the file path as the save is done out of process */
if (virFileAbsPath(to, &absolute_to) < 0) {
- virLibConnError(VIR_ERR_INTERNAL_ERROR,
+ virLibConnError(VIR_ERR_INTERNAL_ERROR, "%s",
_("could not build absolute core file path"));
goto error;
}
@@ -4341,7 +4341,7 @@ virDomainGetXMLDesc(virDomainPtr domain, unsigned int flags)
conn = domain->conn;
if ((conn->flags & VIR_CONNECT_RO) && (flags & VIR_DOMAIN_XML_SECURE)) {
- virLibConnError(VIR_ERR_OPERATION_DENIED,
+ virLibConnError(VIR_ERR_OPERATION_DENIED, "%s",
_("virDomainGetXMLDesc with secure flag"));
goto error;
}
@@ -4523,7 +4523,7 @@ virDomainMigrateVersion1 (virDomainPtr domain,
goto done;
if (uri == NULL && uri_out == NULL) {
- virLibConnError(VIR_ERR_INTERNAL_ERROR,
+ virLibConnError(VIR_ERR_INTERNAL_ERROR, "%s",
_("domainMigratePrepare did not set uri"));
goto done;
}
@@ -4635,7 +4635,7 @@ virDomainMigrateVersion2 (virDomainPtr domain,
goto done;
if (uri == NULL && uri_out == NULL) {
- virLibConnError(VIR_ERR_INTERNAL_ERROR,
+ virLibConnError(VIR_ERR_INTERNAL_ERROR, "%s",
_("domainMigratePrepare2 did not set uri"));
virDispatchError(domain->conn);
cancelled = 1;
@@ -4781,7 +4781,7 @@ virDomainMigrateVersion3(virDomainPtr domain,
}
if (uri == NULL && uri_out == NULL) {
- virLibConnError(VIR_ERR_INTERNAL_ERROR,
+ virLibConnError(VIR_ERR_INTERNAL_ERROR, "%s",
_("domainMigratePrepare3 did not set uri"));
virDispatchError(domain->conn);
goto finish;
@@ -5198,7 +5198,7 @@ virDomainMigrate (virDomainPtr domain,
}
flags &= ~VIR_MIGRATE_CHANGE_PROTECTION;
if (flags & VIR_MIGRATE_TUNNELLED) {
- virLibConnError(VIR_ERR_OPERATION_INVALID,
+ virLibConnError(VIR_ERR_OPERATION_INVALID, "%s",
_("cannot perform tunnelled migration without using peer2peer flag"));
goto error;
}
@@ -5400,7 +5400,7 @@ virDomainMigrate2(virDomainPtr domain,
}
flags &= ~VIR_MIGRATE_CHANGE_PROTECTION;
if (flags & VIR_MIGRATE_TUNNELLED) {
- virLibConnError(VIR_ERR_OPERATION_INVALID,
+ virLibConnError(VIR_ERR_OPERATION_INVALID, "%s",
_("cannot perform tunnelled migration without using peer2peer flag"));
goto error;
}
@@ -14951,7 +14951,7 @@ int virStreamSendAll(virStreamPtr stream,
virCheckNonNullArgGoto(handler, cleanup);
if (stream->flags & VIR_STREAM_NONBLOCK) {
- virLibConnError(VIR_ERR_OPERATION_INVALID,
+ virLibConnError(VIR_ERR_OPERATION_INVALID, "%s",
_("data sources cannot be used for non-blocking streams"));
goto cleanup;
}
@@ -15050,7 +15050,7 @@ int virStreamRecvAll(virStreamPtr stream,
virCheckNonNullArgGoto(handler, cleanup);
if (stream->flags & VIR_STREAM_NONBLOCK) {
- virLibConnError(VIR_ERR_OPERATION_INVALID,
+ virLibConnError(VIR_ERR_OPERATION_INVALID, "%s",
_("data sinks cannot be used for non-blocking streams"));
goto cleanup;
}
@@ -17040,7 +17040,7 @@ virDomainSnapshotGetXMLDesc(virDomainSnapshotPtr snapshot,
conn = snapshot->domain->conn;
if ((conn->flags & VIR_CONNECT_RO) && (flags & VIR_DOMAIN_XML_SECURE)) {
- virLibConnError(VIR_ERR_OPERATION_DENIED,
+ virLibConnError(VIR_ERR_OPERATION_DENIED, "%s",
_("virDomainSnapshotGetXMLDesc with secure flag"));
goto error;
}
diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
index 09c64b2..a057bdd 100644
--- a/src/lxc/lxc_driver.c
+++ b/src/lxc/lxc_driver.c
@@ -2023,7 +2023,8 @@ lxcDomainSetBlkioParameters(virDomainPtr dom,
if (flags & VIR_DOMAIN_AFFECT_LIVE) {
if (!lxcCgroupControllerActive(driver, VIR_CGROUP_CONTROLLER_BLKIO)) {
- lxcError(VIR_ERR_OPERATION_INVALID, _("blkio cgroup isn't mounted"));
+ lxcError(VIR_ERR_OPERATION_INVALID, "%s",
+ _("blkio cgroup isn't mounted"));
goto cleanup;
}
@@ -2127,7 +2128,8 @@ lxcDomainGetBlkioParameters(virDomainPtr dom,
if (flags & VIR_DOMAIN_AFFECT_LIVE) {
if (!lxcCgroupControllerActive(driver, VIR_CGROUP_CONTROLLER_BLKIO)) {
- lxcError(VIR_ERR_OPERATION_INVALID, _("blkio cgroup isn't mounted"));
+ lxcError(VIR_ERR_OPERATION_INVALID, "%s",
+ _("blkio cgroup isn't mounted"));
goto cleanup;
}
diff --git a/src/nwfilter/nwfilter_dhcpsnoop.c b/src/nwfilter/nwfilter_dhcpsnoop.c
index 0a12be5..1971e1a 100644
--- a/src/nwfilter/nwfilter_dhcpsnoop.c
+++ b/src/nwfilter/nwfilter_dhcpsnoop.c
@@ -2,6 +2,7 @@
* nwfilter_dhcpsnoop.c: support for DHCP snooping used by a VM
* on an interface
*
+ * Copyright (C) 2012 Red Hat, Inc.
* Copyright (C) 2011,2012 IBM Corp.
*
* Authors:
@@ -886,7 +887,7 @@ virNWFilterSnoopReqLeaseDel(virNWFilterSnoopReqPtr req,
if (req->techdriver &&
req->techdriver->applyDHCPOnlyRules(req->ifname, &req->macaddr,
dhcpsrvrs, false) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("virNWFilterSnoopListDel failed"));
ret = -1;
}
@@ -1633,7 +1634,7 @@ virNWFilterDHCPSnoopReq(virNWFilterTechDriverPtr techdriver,
if (techdriver->applyDHCPOnlyRules(req->ifname, &req->macaddr,
dhcpsrvrs, false) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("applyDHCPOnlyRules "
"failed - spoofing not protected!"));
goto exit_snoopreqput;
diff --git a/src/openvz/openvz_driver.c b/src/openvz/openvz_driver.c
index a144408..43819a4 100644
--- a/src/openvz/openvz_driver.c
+++ b/src/openvz/openvz_driver.c
@@ -2017,7 +2017,7 @@ openvzUpdateDevice(virDomainDefPtr vmdef,
|| cur->accessmode != fs->accessmode
|| cur->wrpolicy != fs->wrpolicy
|| cur->readonly != fs->readonly) {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("Can only modify disk quota"));
return -1;
}
diff --git a/src/openvz/openvz_util.c b/src/openvz/openvz_util.c
index a878dd6..17528a0 100644
--- a/src/openvz/openvz_util.c
+++ b/src/openvz/openvz_util.c
@@ -45,7 +45,7 @@ openvzKBPerPages(void)
if (kb_per_pages > 0) {
kb_per_pages /= 1024;
} else {
- virReportError(VIR_ERR_INTERNAL_ERROR,
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Can't determine page size"));
kb_per_pages = 0;
return -1;
diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c
index b93887c..9b59738 100644
--- a/src/qemu/qemu_cgroup.c
+++ b/src/qemu/qemu_cgroup.c
@@ -333,7 +333,7 @@ int qemuSetupCgroup(struct qemud_driver *driver,
}
}
} else {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("Block I/O tuning is not available on this host"));
goto cleanup;
}
@@ -372,7 +372,7 @@ int qemuSetupCgroup(struct qemud_driver *driver,
}
}
} else {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("Memory cgroup is not available on this host"));
}
}
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index d6df4ee..1641929 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -3424,7 +3424,7 @@ qemuBuildHubDevStr(virDomainHubDefPtr dev,
}
if (!qemuCapsGet(qemuCaps, QEMU_CAPS_USB_HUB)) {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("usb-hub not supported by QEMU binary"));
goto error;
}
@@ -3553,7 +3553,7 @@ qemuBuildChrChardevStr(virDomainChrSourceDefPtr dev, const char *alias,
case VIR_DOMAIN_CHR_TYPE_SPICEVMC:
if (!qemuCapsGet(qemuCaps, QEMU_CAPS_CHARDEV_SPICEVMC)) {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("spicevmc not supported in this QEMU binary"));
goto error;
}
@@ -4806,7 +4806,7 @@ qemuBuildCommandLine(virConnectPtr conn,
def->controllers[i]->model == -1 &&
!qemuCapsGet(qemuCaps, QEMU_CAPS_PIIX3_USB_UHCI)) {
if (usblegacy) {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("Multiple legacy USB controller not supported"));
goto error;
}
@@ -5813,7 +5813,7 @@ qemuBuildCommandLine(virConnectPtr conn,
switch (mode) {
case VIR_DOMAIN_GRAPHICS_SPICE_CHANNEL_MODE_SECURE:
if (!driver->spiceTLS) {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("spice secure channels set in XML configuration, but TLS is disabled in qemu.conf"));
goto error;
}
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index ecd2ec1..79ca208 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -12886,7 +12886,7 @@ qemuDomainGetPercpuStats(virDomainPtr domain,
if (!map[i]) {
cpu_time = 0;
} else if (virStrToLong_ull(pos, &pos, 10, &cpu_time) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("cpuacct parse error"));
goto cleanup;
} else {
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index d7e2a73..66ac683 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -832,7 +832,7 @@ int qemuDomainAttachNetDevice(virConnectPtr conn,
goto try_remove;
}
} else {
- virReportError(VIR_ERR_OPERATION_FAILED,
+ virReportError(VIR_ERR_OPERATION_FAILED, "%s",
_("setting of link state not supported: Link is up"));
}
diff --git a/src/rpc/virnetsaslcontext.c b/src/rpc/virnetsaslcontext.c
index 9943057..d35d016 100644
--- a/src/rpc/virnetsaslcontext.c
+++ b/src/rpc/virnetsaslcontext.c
@@ -1,7 +1,7 @@
/*
* virnetsaslcontext.c: SASL encryption/auth handling
*
- * Copyright (C) 2010-2011 Red Hat, Inc.
+ * Copyright (C) 2010-2012 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -313,7 +313,7 @@ const char *virNetSASLSessionGetIdentity(virNetSASLSessionPtr sasl)
goto cleanup;
}
if (val == NULL) {
- virReportError(VIR_ERR_AUTH_FAILED,
+ virReportError(VIR_ERR_AUTH_FAILED, "%s",
_("no client username was found"));
goto cleanup;
}
diff --git a/src/rpc/virnetsocket.c b/src/rpc/virnetsocket.c
index aee3c19..87afa2c 100644
--- a/src/rpc/virnetsocket.c
+++ b/src/rpc/virnetsocket.c
@@ -482,7 +482,7 @@ int virNetSocketNewConnectUNIX(const char *path,
remoteAddr.len = sizeof(remoteAddr.data.un);
if (spawnDaemon && !binary) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Auto-spawn of daemon requested, but no binary specified"));
return -1;
}
@@ -1178,7 +1178,7 @@ int virNetSocketSendFD(virNetSocketPtr sock, int fd)
{
int ret = -1;
if (!virNetSocketHasPassFD(sock)) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Sending file descriptors is not supported on this socket"));
return -1;
}
@@ -1212,7 +1212,7 @@ int virNetSocketRecvFD(virNetSocketPtr sock, int *fd)
*fd = -1;
if (!virNetSocketHasPassFD(sock)) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Receiving file descriptors is not supported on this socket"));
return -1;
}
diff --git a/src/storage/storage_backend_disk.c b/src/storage/storage_backend_disk.c
index 75d2927..fc3a9d2 100644
--- a/src/storage/storage_backend_disk.c
+++ b/src/storage/storage_backend_disk.c
@@ -1,7 +1,7 @@
/*
* storage_backend_disk.c: storage backend for disk handling
*
- * Copyright (C) 2007-2008, 2010-2011 Red Hat, Inc.
+ * Copyright (C) 2007-2008, 2010-2012 Red Hat, Inc.
* Copyright (C) 2007-2008 Daniel P. Berrange
*
* This library is free software; you can redistribute it and/or
@@ -399,7 +399,7 @@ virStorageBackendDiskBuildPool(virConnectPtr conn ATTRIBUTE_UNUSED,
if (flags == (VIR_STORAGE_POOL_BUILD_OVERWRITE |
VIR_STORAGE_POOL_BUILD_NO_OVERWRITE)) {
- virReportError(VIR_ERR_OPERATION_INVALID,
+ virReportError(VIR_ERR_OPERATION_INVALID, "%s",
_("Overwrite and no overwrite flags"
" are mutually exclusive"));
goto error;
@@ -415,10 +415,10 @@ virStorageBackendDiskBuildPool(virConnectPtr conn ATTRIBUTE_UNUSED,
if (check > 0) {
ok_to_mklabel = true;
} else if (check < 0) {
- virReportError(VIR_ERR_OPERATION_FAILED,
+ virReportError(VIR_ERR_OPERATION_FAILED, "%s",
_("Error checking for disk label"));
} else {
- virReportError(VIR_ERR_OPERATION_INVALID,
+ virReportError(VIR_ERR_OPERATION_INVALID, "%s",
_("Disk label already present"));
}
}
diff --git a/src/storage/storage_backend_fs.c b/src/storage/storage_backend_fs.c
index 8da985e..cb5e3f3 100644
--- a/src/storage/storage_backend_fs.c
+++ b/src/storage/storage_backend_fs.c
@@ -1,7 +1,7 @@
/*
* storage_backend_fs.c: storage backend for FS and directory handling
*
- * Copyright (C) 2007-2011 Red Hat, Inc.
+ * Copyright (C) 2007-2012 Red Hat, Inc.
* Copyright (C) 2007-2008 Daniel P. Berrange
*
* This library is free software; you can redistribute it and/or
@@ -598,7 +598,7 @@ virStorageBackendFileSystemProbe(const char *device,
}
if (blkid_do_probe(probe) != 1) {
- virReportError(VIR_ERR_STORAGE_PROBE_FAILED,
+ virReportError(VIR_ERR_STORAGE_PROBE_FAILED, "%s",
_("Found additional probes to run, "
"filesystem probing may be incorrect"));
ret = FILESYSTEM_PROBE_ERROR;
@@ -620,7 +620,7 @@ static virStoragePoolProbeResult
virStorageBackendFileSystemProbe(const char *device ATTRIBUTE_UNUSED,
const char *format ATTRIBUTE_UNUSED)
{
- virReportError(VIR_ERR_OPERATION_INVALID,
+ virReportError(VIR_ERR_OPERATION_INVALID, "%s",
_("probing for filesystems is unsupported "
"by this build"));
@@ -743,7 +743,7 @@ virStorageBackendFileSystemBuild(virConnectPtr conn ATTRIBUTE_UNUSED,
if (flags == (VIR_STORAGE_POOL_BUILD_OVERWRITE |
VIR_STORAGE_POOL_BUILD_NO_OVERWRITE)) {
- virReportError(VIR_ERR_OPERATION_INVALID,
+ virReportError(VIR_ERR_OPERATION_INVALID, "%s",
_("Overwrite and no overwrite flags"
" are mutually exclusive"));
goto error;
diff --git a/src/storage/storage_backend_rbd.c b/src/storage/storage_backend_rbd.c
index 4df0b54..185ad0e 100644
--- a/src/storage/storage_backend_rbd.c
+++ b/src/storage/storage_backend_rbd.c
@@ -65,7 +65,7 @@ static int virStorageBackendRBDOpenRADOSConn(virStorageBackendRBDStatePtr *ptr,
VIR_DEBUG("Using cephx authorization");
if (rados_create(&ptr->cluster,
pool->def->source.auth.cephx.username) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("failed to initialize RADOS"));
goto cleanup;
}
@@ -84,7 +84,7 @@ static int virStorageBackendRBDOpenRADOSConn(virStorageBackendRBDStatePtr *ptr,
}
if (secret == NULL) {
- virReportError(VIR_ERR_NO_SECRET,
+ virReportError(VIR_ERR_NO_SECRET, "%s",
_("failed to find the secret"));
goto cleanup;
}
@@ -95,7 +95,7 @@ static int virStorageBackendRBDOpenRADOSConn(virStorageBackendRBDStatePtr *ptr,
memset(secret_value, 0, secret_value_size);
if (rados_key == NULL) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("failed to decode the RADOS key"));
goto cleanup;
}
@@ -119,7 +119,7 @@ static int virStorageBackendRBDOpenRADOSConn(virStorageBackendRBDStatePtr *ptr,
} else {
VIR_DEBUG("Not using cephx authorization");
if (rados_create(&ptr->cluster, NULL) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("failed to create the RADOS cluster"));
goto cleanup;
}
diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c
index c9b8021..e83b1e5 100644
--- a/src/storage/storage_driver.c
+++ b/src/storage/storage_driver.c
@@ -1715,13 +1715,13 @@ storageVolumeResize(virStorageVolPtr obj,
storageDriverUnlock(driver);
if (!pool) {
- virReportError(VIR_ERR_NO_STORAGE_POOL,
+ virReportError(VIR_ERR_NO_STORAGE_POOL, "%s",
_("no storage pool with matching uuid"));
goto out;
}
if (!virStoragePoolObjIsActive(pool)) {
- virReportError(VIR_ERR_OPERATION_INVALID,
+ virReportError(VIR_ERR_OPERATION_INVALID, "%s",
_("storage pool is not active"));
goto out;
}
@@ -1753,20 +1753,20 @@ storageVolumeResize(virStorageVolPtr obj,
}
if (abs_capacity < vol->allocation) {
- virReportError(VIR_ERR_INVALID_ARG,
+ virReportError(VIR_ERR_INVALID_ARG, "%s",
_("can't shrink capacity below "
"existing allocation"));
goto out;
}
if (abs_capacity > vol->capacity + pool->def->available) {
- virReportError(VIR_ERR_OPERATION_FAILED,
+ virReportError(VIR_ERR_OPERATION_FAILED, "%s",
_("Not enough space left on storage pool"));
goto out;
}
if (!backend->resizeVol) {
- virReportError(VIR_ERR_NO_SUPPORT,
+ virReportError(VIR_ERR_NO_SUPPORT, "%s",
_("storage pool does not support changing of "
"volume capacity"));
goto out;
diff --git a/src/test/test_driver.c b/src/test/test_driver.c
index 990b20d..a36af7e 100644
--- a/src/test/test_driver.c
+++ b/src/test/test_driver.c
@@ -3534,7 +3534,7 @@ static int testInterfaceChangeBegin(virConnectPtr conn,
testDriverLock(privconn);
if (privconn->transaction_running) {
- virReportError(VIR_ERR_OPERATION_INVALID,
+ virReportError(VIR_ERR_OPERATION_INVALID, "%s",
_("there is another transaction running."));
goto cleanup;
}
@@ -3562,7 +3562,7 @@ static int testInterfaceChangeCommit(virConnectPtr conn,
testDriverLock(privconn);
if (!privconn->transaction_running) {
- virReportError(VIR_ERR_OPERATION_INVALID,
+ virReportError(VIR_ERR_OPERATION_INVALID, "%s",
_("no transaction running, "
"nothing to be committed."));
goto cleanup;
@@ -3590,7 +3590,7 @@ static int testInterfaceChangeRollback(virConnectPtr conn,
testDriverLock(privconn);
if (!privconn->transaction_running) {
- virReportError(VIR_ERR_OPERATION_INVALID,
+ virReportError(VIR_ERR_OPERATION_INVALID, "%s",
_("no transaction running, "
"nothing to rollback."));
goto cleanup;
diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c
index 17e7e9a..b672b24 100644
--- a/src/vbox/vbox_tmpl.c
+++ b/src/vbox/vbox_tmpl.c
@@ -9311,7 +9311,7 @@ vboxListAllDomains(virConnectPtr conn,
if (MATCH(VIR_CONNECT_LIST_FILTERS_SNAPSHOT)) {
rc = machine->vtbl->GetSnapshotCount(machine, &snapshotCount);
if (NS_FAILED(rc)) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("could not get snapshot count for listed domains"));
goto cleanup;
}
diff --git a/src/xenxs/xen_sxpr.c b/src/xenxs/xen_sxpr.c
index 42533ce..4e005f4 100644
--- a/src/xenxs/xen_sxpr.c
+++ b/src/xenxs/xen_sxpr.c
@@ -1870,7 +1870,7 @@ xenFormatSxprDisk(virDomainDiskDefPtr def,
else
virBufferAddLit(buf, "(mode 'w')");
if (def->transient) {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("transient disks not supported yet"));
return -1;
}
@@ -2515,7 +2515,7 @@ xenFormatSxpr(virConnectPtr conn,
break;
case VIR_DOMAIN_CLOCK_OFFSET_UTC:
if (def->clock.data.utc_reset) {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("unsupported clock adjustment='reset'"));
goto error;
}
@@ -2524,7 +2524,7 @@ xenFormatSxpr(virConnectPtr conn,
break;
case VIR_DOMAIN_CLOCK_OFFSET_LOCALTIME:
if (def->clock.data.utc_reset) {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("unsupported clock adjustment='reset'"));
goto error;
}
diff --git a/src/xenxs/xen_xm.c b/src/xenxs/xen_xm.c
index 99e736e..76c1faa 100644
--- a/src/xenxs/xen_xm.c
+++ b/src/xenxs/xen_xm.c
@@ -208,7 +208,7 @@ static int xenXMConfigGetUUID(virConfPtr conf, const char *name, unsigned char *
virConfValuePtr val;
if (!uuid || !name || !conf) {
- virReportError(VIR_ERR_INVALID_ARG,
+ virReportError(VIR_ERR_INVALID_ARG, "%s",
_("Arguments must be non null"));
return -1;
}
@@ -1242,7 +1242,7 @@ static int xenFormatXMDisk(virConfValuePtr list,
else
virBufferAddLit(&buf, ",w");
if (disk->transient) {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("transient disks not supported yet"));
return -1;
}
@@ -1686,7 +1686,7 @@ virConfPtr xenFormatXM(virConnectPtr conn,
break;
case VIR_DOMAIN_CLOCK_OFFSET_UTC:
if (def->clock.data.utc_reset) {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("unsupported clock adjustment='reset'"));
goto cleanup;
}
@@ -1695,7 +1695,7 @@ virConfPtr xenFormatXM(virConnectPtr conn,
break;
case VIR_DOMAIN_CLOCK_OFFSET_LOCALTIME:
if (def->clock.data.utc_reset) {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("unsupported clock adjustment='reset'"));
goto cleanup;
}
--
1.7.10.4
3
5
[libvirt] [PATCH v8 0/8] Add basic driver for Parallels Virtuozzo Server
by Dmitry Guryanov 26 Jul '12
by Dmitry Guryanov 26 Jul '12
26 Jul '12
Parallels Cloud Server is a virtualization solution
that allows users to simultaneously run multiple virtual
machines and containers on the same physical server.
More information can be found here: http://www.parallels.com/products/pcs/
Also beta version of Parallels Cloud Server can be downloaded there.
Dmitry Guryanov (8):
parallels: add driver skeleton
parallels: add functions to list domains and get info
parallels: implement functions for domain life cycle management
parallels: get info about serial ports
parallels: add support of VNC remote display
parallels: implement virDomainDefineXML operation for existing
domains
parallels: add storage driver
parallels: implement VM creation
cfg.mk | 1 +
configure.ac | 23 +
docs/drvparallels.html.in | 28 +
include/libvirt/virterror.h | 2 +-
libvirt.spec.in | 9 +-
po/POTFILES.in | 4 +
src/Makefile.am | 15 +
src/conf/domain_conf.c | 3 +-
src/conf/domain_conf.h | 1 +
src/driver.h | 1 +
src/libvirt.c | 9 +
src/parallels/parallels_driver.c | 1309 +++++++++++++++++++++++++++++++++
src/parallels/parallels_driver.h | 75 ++
src/parallels/parallels_storage.c | 1456 +++++++++++++++++++++++++++++++++++++
src/parallels/parallels_utils.c | 131 ++++
src/util/virterror.c | 3 +-
16 files changed, 3066 insertions(+), 4 deletions(-)
create mode 100644 docs/drvparallels.html.in
create mode 100644 src/parallels/parallels_driver.c
create mode 100644 src/parallels/parallels_driver.h
create mode 100644 src/parallels/parallels_storage.c
create mode 100644 src/parallels/parallels_utils.c
3
28
[libvirt] [PATCH 0/6 v3] Support forward mode='hostdev' and interface pools
by Shradha Shah 26 Jul '12
by Shradha Shah 26 Jul '12
26 Jul '12
This patch series supports the forward mode='hostdev'. The functionality
of this mode is the same as interface type='hostdev' but with the added
benefit of using interface pools.
The patch series also contains a patch to support use of interface names
and PCI device addresses interchangeably in a network xml, and return
the appropriate one in actualDevice when networkAllocateActualDevice is
called.
At the top level managed attribute can be specified with identical results
as when it's specified for a hostdev.
Currently forward mode='hostdev' does not support USB devices.
Shradha Shah (6):
Prerequisite Patch. virDomainDevicePCIAddress and respective
functions moved to a new file called conf/device_conf.ch
Moved the code to create implicit interface pool from PF to a new
function
RNG updates, new xml parser/formatter code to support forward
mode=hostdev
Code to return interface name or pci_addr of the VF in actualDevice
Forward Mode Hostdev network driver Implementation
Forward Mode 'Hostdev' qemu driver implementation
docs/formatnetwork.html.in | 62 ++++++
docs/schemas/network.rng | 82 ++++++++-
include/libvirt/virterror.h | 1 +
src/Makefile.am | 7 +-
src/conf/device_conf.c | 135 +++++++++++++
src/conf/device_conf.h | 65 +++++++
src/conf/domain_conf.c | 114 ++----------
src/conf/domain_conf.h | 25 +---
src/conf/network_conf.c | 126 +++++++++++--
src/conf/network_conf.h | 29 +++-
src/libvirt_private.syms | 10 +-
src/network/bridge_driver.c | 322 +++++++++++++++++++++++++-------
src/qemu/qemu_command.c | 27 ++-
src/qemu/qemu_hotplug.c | 7 +-
src/qemu/qemu_monitor.c | 14 +-
src/qemu/qemu_monitor.h | 17 +-
src/qemu/qemu_monitor_json.c | 14 +-
src/qemu/qemu_monitor_json.h | 14 +-
src/qemu/qemu_monitor_text.c | 16 +-
src/qemu/qemu_monitor_text.h | 14 +-
src/util/virnetdev.c | 29 ++--
src/util/virnetdev.h | 4 +-
src/xen/xend_internal.c | 3 +-
tests/networkxml2xmlin/hostdev-pf.xml | 11 +
tests/networkxml2xmlin/hostdev.xml | 10 +
tests/networkxml2xmlout/hostdev-pf.xml | 7 +
tests/networkxml2xmlout/hostdev.xml | 10 +
tests/networkxml2xmltest.c | 2 +
28 files changed, 890 insertions(+), 287 deletions(-)
create mode 100644 src/conf/device_conf.c
create mode 100644 src/conf/device_conf.h
create mode 100644 tests/networkxml2xmlin/hostdev-pf.xml
create mode 100644 tests/networkxml2xmlin/hostdev.xml
create mode 100644 tests/networkxml2xmlout/hostdev-pf.xml
create mode 100644 tests/networkxml2xmlout/hostdev.xml
--
1.7.4.4
2
9