mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-10-27 11:34:09 +03:00
Compare commits
7 Commits
v5.0.0-rc2
...
v4.10-main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
09c2635d0d | ||
|
|
d238f132e6 | ||
|
|
3f744efec3 | ||
|
|
3572564893 | ||
|
|
f8d8a7a182 | ||
|
|
a712f01682 | ||
|
|
8d12118171 |
2
.gnulib
2
.gnulib
Submodule .gnulib updated: 8089c00979...68df637b5f
37
bootstrap
37
bootstrap
@@ -1,10 +1,10 @@
|
||||
#! /bin/sh
|
||||
# Print a version string.
|
||||
scriptversion=2019-01-04.17; # UTC
|
||||
scriptversion=2018-07-01.02; # UTC
|
||||
|
||||
# Bootstrap this package from checked-out sources.
|
||||
|
||||
# Copyright (C) 2003-2019 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2003-2018 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -142,9 +142,6 @@ die() { warn_ "$@"; exit 1; }
|
||||
|
||||
# Configuration.
|
||||
|
||||
# Name of the Makefile.am
|
||||
gnulib_mk=gnulib.mk
|
||||
|
||||
# List of gnulib modules needed.
|
||||
gnulib_modules=
|
||||
|
||||
@@ -162,11 +159,18 @@ bootstrap_post_import_hook() { :; }
|
||||
# Override it via your own definition in bootstrap.conf.
|
||||
bootstrap_epilogue() { :; }
|
||||
|
||||
# The command to download all .po files for a specified domain into a
|
||||
# specified directory. Fill in the first %s with the destination
|
||||
# directory and the second with the domain name.
|
||||
# The command to download all .po files for a specified domain into
|
||||
# a specified directory. Fill in the first %s is the domain name, and
|
||||
# the second with the destination directory. Use rsync's -L and -r
|
||||
# options because the latest/%s directory and the .po files within are
|
||||
# all symlinks.
|
||||
po_download_command_format=\
|
||||
"wget --mirror --level=1 -nd -q -A.po -P '%s' \
|
||||
"rsync --delete --exclude '*.s1' -Lrtvz \
|
||||
'translationproject.org::tp/latest/%s/' '%s'"
|
||||
|
||||
# Fallback for downloading .po files (if rsync fails).
|
||||
po_download_command_format2=\
|
||||
"wget --mirror -nd -q -np -A.po -P '%s' \
|
||||
https://translationproject.org/latest/%s/"
|
||||
|
||||
# Prefer a non-empty tarname (4th argument of AC_INIT if given), else
|
||||
@@ -734,7 +738,10 @@ download_po_files() {
|
||||
subdir=$1
|
||||
domain=$2
|
||||
echo "$me: getting translations into $subdir for $domain..."
|
||||
cmd=$(printf "$po_download_command_format" "$subdir" "$domain")
|
||||
cmd=$(printf "$po_download_command_format" "$domain" "$subdir")
|
||||
eval "$cmd" && return
|
||||
# Fallback to HTTPS.
|
||||
cmd=$(printf "$po_download_command_format2" "$subdir" "$domain")
|
||||
eval "$cmd"
|
||||
}
|
||||
|
||||
@@ -963,16 +970,6 @@ fi
|
||||
bootstrap_post_import_hook \
|
||||
|| die "bootstrap_post_import_hook failed"
|
||||
|
||||
# Don't proceed if there are uninitialized submodules. In particular,
|
||||
# the next step will remove dangling links, which might be links into
|
||||
# uninitialized submodules.
|
||||
#
|
||||
# Uninitialized submodules are listed with an initial dash.
|
||||
if $use_git && git submodule | grep '^-' >/dev/null; then
|
||||
die "some git submodules are not initialized. " \
|
||||
"Run 'git submodule init' and bootstrap again."
|
||||
fi
|
||||
|
||||
# Remove any dangling symlink matching "*.m4" or "*.[ch]" in some
|
||||
# gnulib-populated directories. Such .m4 files would cause aclocal to fail.
|
||||
# The following requires GNU find 4.2.3 or newer. Considering the usual
|
||||
|
||||
@@ -16,6 +16,9 @@
|
||||
# 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:
|
||||
# Daniel P. Berrange <berrange@redhat.com>
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
@@ -16,6 +16,9 @@
|
||||
# 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:
|
||||
# Daniel P. Berrange <berrange@redhat.com>
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
@@ -1,156 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
#
|
||||
# Validate that header files follow a standard layout:
|
||||
#
|
||||
# /*
|
||||
# ...copyright header...
|
||||
# */
|
||||
# <one blank line>
|
||||
# #ifndef SYMBOL
|
||||
# # define SYMBOL
|
||||
# ....content....
|
||||
# #endif /* SYMBOL */
|
||||
#
|
||||
# For any file ending priv.h, before the #ifndef
|
||||
# We will have a further section
|
||||
#
|
||||
# #ifndef SYMBOL_ALLOW
|
||||
# # error ....
|
||||
# #endif /* SYMBOL_ALLOW */
|
||||
# <one blank line>
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
my $STATE_COPYRIGHT_COMMENT = 0;
|
||||
my $STATE_COPYRIGHT_BLANK = 1;
|
||||
my $STATE_PRIV_START = 2;
|
||||
my $STATE_PRIV_ERROR = 3;
|
||||
my $STATE_PRIV_END = 4;
|
||||
my $STATE_PRIV_BLANK = 5;
|
||||
my $STATE_GUARD_START = 6;
|
||||
my $STATE_GUARD_DEFINE = 7;
|
||||
my $STATE_GUARD_END = 8;
|
||||
my $STATE_EOF = 9;
|
||||
|
||||
my $file = " ";
|
||||
my $ret = 0;
|
||||
my $ifdef = "";
|
||||
my $ifdefpriv = "";
|
||||
|
||||
my $state = $STATE_EOF;
|
||||
my $mistake = 0;
|
||||
|
||||
sub mistake {
|
||||
my $msg = shift;
|
||||
warn $msg;
|
||||
$mistake = 1;
|
||||
$ret = 1;
|
||||
}
|
||||
|
||||
while (<>) {
|
||||
if (not $file eq $ARGV) {
|
||||
if ($state == $STATE_COPYRIGHT_COMMENT) {
|
||||
&mistake("$file: missing copyright comment");
|
||||
} elsif ($state == $STATE_COPYRIGHT_BLANK) {
|
||||
&mistake("$file: missing blank line after copyright header");
|
||||
} elsif ($state == $STATE_PRIV_START) {
|
||||
&mistake("$file: missing '#ifndef $ifdefpriv'");
|
||||
} elsif ($state == $STATE_PRIV_ERROR) {
|
||||
&mistake("$file: missing '# error ...priv allow...'");
|
||||
} elsif ($state == $STATE_PRIV_END) {
|
||||
&mistake("$file: missing '#endif /* $ifdefpriv */'");
|
||||
} elsif ($state == $STATE_PRIV_BLANK) {
|
||||
&mistake("$file: missing blank line after priv header check");
|
||||
} elsif ($state == $STATE_GUARD_START) {
|
||||
&mistake("$file: missing '#ifndef $ifdef'");
|
||||
} elsif ($state == $STATE_GUARD_DEFINE) {
|
||||
&mistake("$file: missing '# define $ifdef'");
|
||||
} elsif ($state == $STATE_GUARD_END) {
|
||||
&mistake("$file: missing '#endif /* $ifdef */'");
|
||||
}
|
||||
|
||||
$ifdef = uc $ARGV;
|
||||
$ifdef =~ s,.*/,,;
|
||||
$ifdef =~ s,[^A-Z0-9],_,g;
|
||||
$ifdef =~ s,__+,_,g;
|
||||
unless ($ifdef =~ /^LIBVIRT_/ && $ARGV !~ /libvirt_internal.h/) {
|
||||
$ifdef = "LIBVIRT_" . $ifdef;
|
||||
}
|
||||
$ifdefpriv = $ifdef . "_ALLOW";
|
||||
|
||||
$file = $ARGV;
|
||||
$state = $STATE_COPYRIGHT_COMMENT;
|
||||
$mistake = 0;
|
||||
}
|
||||
|
||||
if ($mistake ||
|
||||
$ARGV =~ /config-post\.h$/ ||
|
||||
$ARGV =~ /vbox_(CAPI|XPCOM)/) {
|
||||
$state = $STATE_EOF;
|
||||
next;
|
||||
}
|
||||
|
||||
if ($state == $STATE_COPYRIGHT_COMMENT) {
|
||||
if (m,\*/,) {
|
||||
$state = $STATE_COPYRIGHT_BLANK;
|
||||
}
|
||||
} elsif ($state == $STATE_COPYRIGHT_BLANK) {
|
||||
if (! /^$/) {
|
||||
&mistake("$file: missing blank line after copyright header");
|
||||
}
|
||||
if ($ARGV =~ /priv\.h$/) {
|
||||
$state = $STATE_PRIV_START;
|
||||
} else {
|
||||
$state = $STATE_GUARD_START;
|
||||
}
|
||||
} elsif ($state == $STATE_PRIV_START) {
|
||||
if (/^$/) {
|
||||
&mistake("$file: too many blank lines after coyright header");
|
||||
} elsif (/#ifndef $ifdefpriv$/) {
|
||||
$state = $STATE_PRIV_ERROR;
|
||||
} else {
|
||||
&mistake("$file: missing '#ifndef $ifdefpriv'");
|
||||
}
|
||||
} elsif ($state == $STATE_PRIV_ERROR) {
|
||||
if (/# error ".*"$/) {
|
||||
$state = $STATE_PRIV_END;
|
||||
} else {
|
||||
&mistake("$file: missing '#error ...priv allow...'");
|
||||
}
|
||||
} elsif ($state == $STATE_PRIV_END) {
|
||||
if (m,#endif /\* $ifdefpriv \*/,) {
|
||||
$state = $STATE_PRIV_BLANK;
|
||||
} else {
|
||||
&mistake("$file: missing '#endif /* $ifdefpriv */'");
|
||||
}
|
||||
} elsif ($state == $STATE_PRIV_BLANK) {
|
||||
if (! /^$/) {
|
||||
&mistake("$file: missing blank line after priv guard");
|
||||
}
|
||||
$state = $STATE_GUARD_START;
|
||||
} elsif ($state == $STATE_GUARD_START) {
|
||||
if (/^$/) {
|
||||
&mistake("$file: too many blank lines after coyright header");
|
||||
} elsif (/#ifndef $ifdef$/) {
|
||||
$state = $STATE_GUARD_DEFINE;
|
||||
} else {
|
||||
&mistake("$file: missing '#ifndef $ifdef'");
|
||||
}
|
||||
} elsif ($state == $STATE_GUARD_DEFINE) {
|
||||
if (/# define $ifdef$/) {
|
||||
$state = $STATE_GUARD_END;
|
||||
} else {
|
||||
&mistake("$file: missing '# define $ifdef'");
|
||||
}
|
||||
} elsif ($state == $STATE_GUARD_END) {
|
||||
if (m,#endif /\* $ifdef \*/$,) {
|
||||
$state = $STATE_EOF;
|
||||
}
|
||||
} elsif ($state == $STATE_EOF) {
|
||||
die "$file: unexpected content after '#endif /* $ifdef */'";
|
||||
} else {
|
||||
die "$file: unexpected state $state";
|
||||
}
|
||||
}
|
||||
exit $ret;
|
||||
115
cfg.mk
115
cfg.mk
@@ -1,5 +1,5 @@
|
||||
# Customize Makefile.maint. -*- makefile -*-
|
||||
# Copyright (C) 2008-2019 Red Hat, Inc.
|
||||
# Copyright (C) 2008-2015 Red Hat, Inc.
|
||||
# Copyright (C) 2003-2008 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
@@ -305,7 +305,7 @@ sc_flags_usage:
|
||||
$(srcdir)/include/libvirt/libvirt-qemu.h \
|
||||
$(srcdir)/include/libvirt/libvirt-lxc.h \
|
||||
$(srcdir)/include/libvirt/libvirt-admin.h \
|
||||
| $(GREP) -c '\(long\|unsigned\) flags')" != 4 && \
|
||||
| grep -c '\(long\|unsigned\) flags')" != 4 && \
|
||||
{ echo '$(ME): new API should use "unsigned int flags"' 1>&2; \
|
||||
exit 1; } || :
|
||||
@prohibit=' flags ATTRIBUTE_UNUSED' \
|
||||
@@ -639,12 +639,10 @@ sc_libvirt_unmarked_diagnostics:
|
||||
exclude='_\(' \
|
||||
halt='found unmarked diagnostic(s)' \
|
||||
$(_sc_search_regexp)
|
||||
@{ $(VC_LIST_EXCEPT) | xargs \
|
||||
$(GREP) -nE '\<$(func_re) *\(.*;$$' /dev/null; \
|
||||
$(VC_LIST_EXCEPT) | xargs \
|
||||
$(GREP) -A1 -nE '\<$(func_re) *\(.*,$$' /dev/null; } \
|
||||
| $(SED) -E 's/_\("([^\"]|\\.)+"//;s/"%s"//' \
|
||||
| $(GREP) '"' && \
|
||||
@{ grep -nE '\<$(func_re) *\(.*;$$' $$($(VC_LIST_EXCEPT)); \
|
||||
grep -A1 -nE '\<$(func_re) *\(.*,$$' $$($(VC_LIST_EXCEPT)); } \
|
||||
| $(SED) 's/_("\([^\"]\|\\.\)\+"//;s/[ ]"%s"//' \
|
||||
| grep '[ ]"' && \
|
||||
{ echo '$(ME): found unmarked diagnostic(s)' 1>&2; \
|
||||
exit 1; } || :
|
||||
|
||||
@@ -656,9 +654,9 @@ sc_libvirt_unmarked_diagnostics:
|
||||
# there are functions to which this one applies but that do not get marked
|
||||
# diagnostics.
|
||||
sc_prohibit_newline_at_end_of_diagnostic:
|
||||
@$(VC_LIST_EXCEPT) | xargs $(GREP) -A2 -nE \
|
||||
'\<$(func_re) *\(' /dev/null \
|
||||
| $(GREP) '\\n"' \
|
||||
@grep -A2 -nE \
|
||||
'\<$(func_re) *\(' $$($(VC_LIST_EXCEPT)) \
|
||||
| grep '\\n"' \
|
||||
&& { echo '$(ME): newline at end of message(s)' 1>&2; \
|
||||
exit 1; } || :
|
||||
|
||||
@@ -666,14 +664,12 @@ sc_prohibit_newline_at_end_of_diagnostic:
|
||||
# allow VIR_ERROR to do this, and ignore functions that take a single
|
||||
# string rather than a format argument.
|
||||
sc_prohibit_diagnostic_without_format:
|
||||
@{ $(VC_LIST_EXCEPT) | xargs \
|
||||
$(GREP) -nE '\<$(func_re) *\(.*;$$' /dev/null; \
|
||||
$(VC_LIST_EXCEPT) | xargs \
|
||||
$(GREP) -A2 -nE '\<$(func_re) *\(.*,$$' /dev/null; } \
|
||||
@{ grep -nE '\<$(func_re) *\(.*;$$' $$($(VC_LIST_EXCEPT)); \
|
||||
grep -A2 -nE '\<$(func_re) *\(.*,$$' $$($(VC_LIST_EXCEPT)); } \
|
||||
| $(SED) -rn -e ':l; /[,"]$$/ {N;b l;}' \
|
||||
-e '/(xenapiSessionErrorHandler|vah_(error|warning))/d' \
|
||||
-e '/\<$(func_re) *\([^"]*"([^%"]|"\n[^"]*")*"[,)]/p' \
|
||||
| $(GREP) -vE 'VIR_ERROR' && \
|
||||
| grep -vE 'VIR_ERROR' && \
|
||||
{ echo '$(ME): found diagnostic without %' 1>&2; \
|
||||
exit 1; } || :
|
||||
|
||||
@@ -691,16 +687,16 @@ sc_prohibit_useless_translation:
|
||||
# When splitting a diagnostic across lines, ensure that there is a space
|
||||
# or \n on one side of the split.
|
||||
sc_require_whitespace_in_translation:
|
||||
@$(VC_LIST_EXCEPT) | xargs $(GREP) -n -A1 '"$$' /dev/null \
|
||||
@grep -n -A1 '"$$' $$($(VC_LIST_EXCEPT)) \
|
||||
| $(SED) -ne ':l; /"$$/ {N;b l;}; s/"\n[^"]*"/""/g; s/\\n/ /g' \
|
||||
-e '/_(.*[^\ ]""[^\ ]/p' | $(GREP) . && \
|
||||
-e '/_(.*[^\ ]""[^\ ]/p' | grep . && \
|
||||
{ echo '$(ME): missing whitespace at line split' 1>&2; \
|
||||
exit 1; } || :
|
||||
|
||||
# Enforce recommended preprocessor indentation style.
|
||||
sc_preprocessor_indentation:
|
||||
@if cppi --version >/dev/null 2>&1; then \
|
||||
$(VC_LIST_EXCEPT) | $(GREP) -E '\.[ch](\.in)?$$' | xargs cppi -a -c \
|
||||
$(VC_LIST_EXCEPT) | grep -E '\.[ch](\.in)?$$' | xargs cppi -a -c \
|
||||
|| { echo '$(ME): incorrect preprocessor indentation' 1>&2; \
|
||||
exit 1; }; \
|
||||
else \
|
||||
@@ -711,13 +707,13 @@ sc_preprocessor_indentation:
|
||||
# (comment-only) C file that mirrors the same layout as the spec file.
|
||||
sc_spec_indentation:
|
||||
@if cppi --version >/dev/null 2>&1; then \
|
||||
for f in $$($(VC_LIST_EXCEPT) | $(GREP) '\.spec\.in$$'); do \
|
||||
for f in $$($(VC_LIST_EXCEPT) | grep '\.spec\.in$$'); do \
|
||||
$(SED) -e 's|#|// #|; s|%ifn*\(arch\)* |#if a // |' \
|
||||
-e 's/%\(else\|endif\|define\)/#\1/' \
|
||||
-e 's/^\( *\)\1\1\1#/#\1/' \
|
||||
-e 's|^\( *[^#/ ]\)|// \1|; s|^\( */[^/]\)|// \1|' $$f \
|
||||
| cppi -a -c 2>&1 | $(SED) "s|standard input|$$f|"; \
|
||||
done | { if $(GREP) . >&2; then false; else :; fi; } \
|
||||
done | { if grep . >&2; then false; else :; fi; } \
|
||||
|| { echo '$(ME): incorrect preprocessor indentation' 1>&2; \
|
||||
exit 1; }; \
|
||||
else \
|
||||
@@ -807,12 +803,11 @@ sc_prohibit_cross_inclusion:
|
||||
# When converting an enum to a string, make sure that we track any new
|
||||
# elements added to the enum by using a _LAST marker.
|
||||
sc_require_enum_last_marker:
|
||||
@$(VC_LIST_EXCEPT) | xargs \
|
||||
$(GREP) -A1 -nE '^[^#]*VIR_ENUM_IMPL *\(' /dev/null \
|
||||
@grep -A1 -nE '^[^#]*VIR_ENUM_IMPL *\(' $$($(VC_LIST_EXCEPT)) \
|
||||
| $(SED) -ne '/VIR_ENUM_IMPL[^,]*,$$/N' \
|
||||
-e '/VIR_ENUM_IMPL[^,]*,[^,]*[^_,][^L,][^A,][^S,][^T,],/p' \
|
||||
-e '/VIR_ENUM_IMPL[^,]*,[^,]\{0,4\},/p' \
|
||||
| $(GREP) . && \
|
||||
| grep . && \
|
||||
{ echo '$(ME): enum impl needs to use _LAST marker' 1>&2; \
|
||||
exit 1; } || :
|
||||
|
||||
@@ -871,7 +866,8 @@ sc_prohibit_atoi:
|
||||
$(_sc_search_regexp)
|
||||
|
||||
sc_prohibit_wrong_filename_in_comment:
|
||||
@$(VC_LIST_EXCEPT) | $(GREP) '\.[ch]$$' | xargs awk 'BEGIN { \
|
||||
@fail=0; \
|
||||
awk 'BEGIN { \
|
||||
fail=0; \
|
||||
} FNR < 3 { \
|
||||
n=match($$0, /[[:space:]][^[:space:]]*[.][ch][[:space:]:]/); \
|
||||
@@ -887,8 +883,11 @@ sc_prohibit_wrong_filename_in_comment:
|
||||
if (fail == 1) { \
|
||||
exit 1; \
|
||||
} \
|
||||
}' || { echo '$(ME): The file name in comments must match the' \
|
||||
'actual file name' 1>&2; exit 1; }
|
||||
}' $$($(VC_LIST_EXCEPT) | grep '\.[ch]$$') || fail=1; \
|
||||
if test $$fail -eq 1; then \
|
||||
{ echo '$(ME): The file name in comments must match the' \
|
||||
'actual file name' 1>&2; exit 1; } \
|
||||
fi;
|
||||
|
||||
sc_prohibit_virConnectOpen_in_virsh:
|
||||
@prohibit='\bvirConnectOpen[a-zA-Z]* *\(' \
|
||||
@@ -919,21 +918,22 @@ sc_require_if_else_matching_braces:
|
||||
$(_sc_search_regexp)
|
||||
|
||||
sc_curly_braces_style:
|
||||
@if $(VC_LIST_EXCEPT) | $(GREP) '\.[ch]$$' | xargs $(GREP) -nHP \
|
||||
@files=$$($(VC_LIST_EXCEPT) | grep '\.[ch]$$'); \
|
||||
if $(GREP) -nHP \
|
||||
'^\s*(?!([a-zA-Z_]*for_?each[a-zA-Z_]*) ?\()([_a-zA-Z0-9]+( [_a-zA-Z0-9]+)* ?\()?(\*?[_a-zA-Z0-9]+(,? \*?[_a-zA-Z0-9\[\]]+)+|void)\) ?\{' \
|
||||
/dev/null; then \
|
||||
$$files; then \
|
||||
echo '$(ME): Non-K&R style used for curly braces around' \
|
||||
'function body' 1>&2; exit 1; \
|
||||
fi; \
|
||||
if $(VC_LIST_EXCEPT) | $(GREP) '\.[ch]$$' | xargs \
|
||||
$(GREP) -A1 -En ' ((if|for|while|switch) \(|(else|do)\b)[^{]*$$' \
|
||||
/dev/null | $(GREP) '^[^ ]*- *{'; then \
|
||||
if $(GREP) -A1 -En ' ((if|for|while|switch) \(|(else|do)\b)[^{]*$$'\
|
||||
$$files | $(GREP) '^[^ ]*- *{'; then \
|
||||
echo '$(ME): Use hanging braces for compound statements' 1>&2; exit 1; \
|
||||
fi
|
||||
|
||||
sc_prohibit_windows_special_chars_in_filename:
|
||||
@$(VC_LIST_EXCEPT) | $(GREP) '[:*?"<>|]' && \
|
||||
{ echo '$(ME): Windows special chars in filename not allowed' 1>&2; echo exit 1; } || :
|
||||
@files=$$($(VC_LIST_EXCEPT) | grep '[:*?"<>|]'); \
|
||||
test -n "$$files" && { echo '$(ME): Windows special chars' \
|
||||
'in filename not allowed:' 1>&2; echo $$files 1>&2; exit 1; } || :
|
||||
|
||||
sc_prohibit_mixed_case_abbreviations:
|
||||
@prohibit='Pci|Usb|Scsi' \
|
||||
@@ -949,11 +949,11 @@ sc_require_locale_h:
|
||||
$(_sc_search_regexp)
|
||||
|
||||
sc_prohibit_empty_first_line:
|
||||
@$(VC_LIST_EXCEPT) | xargs awk 'BEGIN { fail=0; } \
|
||||
@awk 'BEGIN { fail=0; } \
|
||||
FNR == 1 { if ($$0 == "") { print FILENAME ":1:"; fail=1; } } \
|
||||
END { if (fail == 1) { \
|
||||
print "$(ME): Prohibited empty first line" > "/dev/stderr"; \
|
||||
} exit fail; }'
|
||||
} exit fail; }' $$($(VC_LIST_EXCEPT));
|
||||
|
||||
sc_prohibit_paren_brace:
|
||||
@prohibit='\)\{$$' \
|
||||
@@ -996,9 +996,8 @@ sc_prohibit_sysconf_pagesize:
|
||||
$(_sc_search_regexp)
|
||||
|
||||
sc_prohibit_virSecurity:
|
||||
@$(VC_LIST_EXCEPT) | $(GREP) 'src/qemu/' | \
|
||||
$(GREP) -v 'src/qemu/qemu_security' | \
|
||||
xargs $(GREP) -Pn 'virSecurityManager(?!Ptr)' /dev/null && \
|
||||
@grep -Pn 'virSecurityManager(?!Ptr)' $$($(VC_LIST_EXCEPT) | grep 'src/qemu/' | \
|
||||
grep -v 'src/qemu/qemu_security') && \
|
||||
{ echo '$(ME): prefer qemuSecurity wrappers' 1>&2; exit 1; } || :
|
||||
|
||||
sc_prohibit_pthread_create:
|
||||
@@ -1051,11 +1050,6 @@ sc_prohibit_http_urls:
|
||||
halt='Links must use https:// protocol' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
sc_prohibit_author:
|
||||
@prohibit="(\*|#)\s*(A|a)uthors?:" \
|
||||
halt="Author: statements are prohibited in source comments" \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
# Alignment is usually achieved through spaces (at least two of them)
|
||||
# or tabs (at least one of them) right before the trailing backslash
|
||||
sc_prohibit_backslash_alignment:
|
||||
@@ -1067,7 +1061,7 @@ sc_prohibit_backslash_alignment:
|
||||
# Some syntax rules pertaining to the usage of cleanup macros
|
||||
# implementing GNU C's cleanup attribute
|
||||
|
||||
# Rule to ensure that variables declared using a cleanup macro are
|
||||
# Rule to ensure that varibales declared using a cleanup macro are
|
||||
# always initialized.
|
||||
sc_require_attribute_cleanup_initialization:
|
||||
@prohibit='VIR_AUTO((FREE|PTR)\(.+\)|CLOSE) *[^=]+;' \
|
||||
@@ -1123,34 +1117,29 @@ _autogen_error:
|
||||
|
||||
ifneq ($(_gl-Makefile),)
|
||||
syntax-check: spacing-check test-wrap-argv \
|
||||
prohibit-duplicate-header mock-noinline group-qemu-caps \
|
||||
header-ifdef
|
||||
prohibit-duplicate-header mock-noinline group-qemu-caps
|
||||
endif
|
||||
|
||||
# Don't include duplicate header in the source (either *.c or *.h)
|
||||
prohibit-duplicate-header:
|
||||
$(AM_V_GEN)$(VC_LIST_EXCEPT) | $(GREP) '\.[chx]$$' | xargs \
|
||||
$(PERL) -W $(top_srcdir)/build-aux/prohibit-duplicate-header.pl
|
||||
$(AM_V_GEN)files=$$($(VC_LIST_EXCEPT) | grep '\.[chx]$$'); \
|
||||
$(PERL) -W $(top_srcdir)/build-aux/prohibit-duplicate-header.pl $$files
|
||||
|
||||
spacing-check:
|
||||
$(AM_V_GEN)$(VC_LIST) | $(GREP) '\.c$$' | xargs \
|
||||
$(PERL) $(top_srcdir)/build-aux/check-spacing.pl || \
|
||||
$(AM_V_GEN)files=`$(VC_LIST) | grep '\.c$$'`; \
|
||||
$(PERL) $(top_srcdir)/build-aux/check-spacing.pl $$files || \
|
||||
{ echo '$(ME): incorrect formatting' 1>&2; exit 1; }
|
||||
|
||||
mock-noinline:
|
||||
$(AM_V_GEN)$(VC_LIST) | $(GREP) '\.[ch]$$' | xargs \
|
||||
$(PERL) $(top_srcdir)/build-aux/mock-noinline.pl
|
||||
|
||||
header-ifdef:
|
||||
$(AM_V_GEN)$(VC_LIST) | $(GREP) '\.[h]$$' | xargs \
|
||||
$(PERL) $(top_srcdir)/build-aux/header-ifdef.pl
|
||||
$(AM_V_GEN)files=`$(VC_LIST) | grep '\.[ch]$$'`; \
|
||||
$(PERL) $(top_srcdir)/build-aux/mock-noinline.pl $$files
|
||||
|
||||
test-wrap-argv:
|
||||
$(AM_V_GEN)$(VC_LIST) | $(GREP) -E '\.(ldargs|args)' | xargs \
|
||||
$(PERL) $(top_srcdir)/tests/test-wrap-argv.pl --check
|
||||
$(AM_V_GEN)files=`$(VC_LIST) | grep -E '\.(ldargs|args)'`; \
|
||||
$(PERL) $(top_srcdir)/tests/test-wrap-argv.pl --check $$files
|
||||
|
||||
group-qemu-caps:
|
||||
$(AM_V_GEN)$(PERL) $(top_srcdir)/tests/group-qemu-caps.pl --check $(top_srcdir)/
|
||||
$(PERL) $(top_srcdir)/tests/group-qemu-caps.pl --check $(top_srcdir)/
|
||||
|
||||
# sc_po_check can fail if generated files are not built first
|
||||
sc_po_check: \
|
||||
@@ -1189,7 +1178,7 @@ exclude_file_name_regexp--sc_copyright_usage = \
|
||||
^COPYING(|\.LESSER)$$
|
||||
|
||||
exclude_file_name_regexp--sc_flags_usage = \
|
||||
^(cfg\.mk|docs/|src/util/virnetdevtap\.c$$|tests/((vir(cgroup|pci|test|usb)|nss|qemuxml2argv|qemusecurity)mock|virfilewrapper)\.c$$)
|
||||
^(cfg\.mk|docs/|src/util/virnetdevtap\.c$$|tests/((vir(cgroup|pci|test|usb)|nss|qemuxml2argv)mock|virfilewrapper)\.c$$)
|
||||
|
||||
exclude_file_name_regexp--sc_libvirt_unmarked_diagnostics = \
|
||||
^(src/rpc/gendispatch\.pl$$|tests/)
|
||||
@@ -1212,7 +1201,7 @@ exclude_file_name_regexp--sc_prohibit_strdup = \
|
||||
^(docs/|examples/|src/util/virstring\.c|tests/vir(netserverclient|cgroup)mock.c|tests/commandhelper\.c$$)
|
||||
|
||||
exclude_file_name_regexp--sc_prohibit_close = \
|
||||
(\.p[yl]$$|\.spec\.in$$|^docs/|^(src/util/virfile\.c|src/libvirt-stream\.c|tests/(vir.+mock\.c|commandhelper\.c|qemusecuritymock\.c))$$)
|
||||
(\.p[yl]$$|\.spec\.in$$|^docs/|^(src/util/virfile\.c|src/libvirt-stream\.c|tests/vir.+mock\.c|tests/commandhelper\.c)$$)
|
||||
|
||||
exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF = \
|
||||
(^tests/(virhostcpu|virpcitest)data/|docs/js/.*\.js|docs/fonts/.*\.woff|\.diff|tests/virconfdata/no-newline\.conf$$)
|
||||
@@ -1233,7 +1222,7 @@ exclude_file_name_regexp--sc_prohibit_newline_at_end_of_diagnostic = \
|
||||
^src/rpc/gendispatch\.pl$$
|
||||
|
||||
exclude_file_name_regexp--sc_prohibit_nonreentrant = \
|
||||
^((po|tests|examples/admin)/|docs/.*(py|js|html\.in)|run.in$$|tools/wireshark/util/genxdrstub\.pl$$)
|
||||
^((po|tests)/|docs/.*(py|js|html\.in)|run.in$$|tools/wireshark/util/genxdrstub\.pl$$)
|
||||
|
||||
exclude_file_name_regexp--sc_prohibit_select = \
|
||||
^cfg\.mk$$
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
/*
|
||||
* Since virt-login-shell will be setuid, we must do everything
|
||||
* we can to avoid linking to other libraries. Many of them do
|
||||
* unsafe things in functions marked __attribute__((constructor)).
|
||||
* unsafe things in functions marked __atttribute__((constructor)).
|
||||
* The only way to avoid such deps is to re-compile the
|
||||
* functions with the code in question disabled, and for that we
|
||||
* must override the main config.h rules. Hence this file :-(
|
||||
|
||||
@@ -16,7 +16,7 @@ dnl You should have received a copy of the GNU Lesser General Public
|
||||
dnl License along with this library. If not, see
|
||||
dnl <http://www.gnu.org/licenses/>.
|
||||
|
||||
AC_INIT([libvirt], [5.0.0], [libvir-list@redhat.com], [], [https://libvirt.org])
|
||||
AC_INIT([libvirt], [4.10.0], [libvir-list@redhat.com], [], [https://libvirt.org])
|
||||
AC_CONFIG_SRCDIR([src/libvirt.c])
|
||||
AC_CONFIG_AUX_DIR([build-aux])
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
@@ -225,6 +225,7 @@ if test "$with_libvirtd" = "no" ; then
|
||||
with_qemu=no
|
||||
with_lxc=no
|
||||
with_libxl=no
|
||||
with_uml=no
|
||||
with_vbox=no
|
||||
fi
|
||||
|
||||
@@ -444,6 +445,7 @@ LIBVIRT_DRIVER_ARG_VBOX
|
||||
LIBVIRT_DRIVER_ARG_LXC
|
||||
LIBVIRT_DRIVER_ARG_VZ
|
||||
LIBVIRT_DRIVER_ARG_BHYVE
|
||||
LIBVIRT_DRIVER_ARG_UML
|
||||
LIBVIRT_DRIVER_ARG_ESX
|
||||
LIBVIRT_DRIVER_ARG_HYPERV
|
||||
LIBVIRT_DRIVER_ARG_TEST
|
||||
@@ -462,6 +464,7 @@ LIBVIRT_DRIVER_CHECK_VBOX
|
||||
LIBVIRT_DRIVER_CHECK_LXC
|
||||
LIBVIRT_DRIVER_CHECK_VZ
|
||||
LIBVIRT_DRIVER_CHECK_BHYVE
|
||||
LIBVIRT_DRIVER_CHECK_UML
|
||||
LIBVIRT_DRIVER_CHECK_ESX
|
||||
LIBVIRT_DRIVER_CHECK_HYPERV
|
||||
LIBVIRT_DRIVER_CHECK_TEST
|
||||
@@ -944,6 +947,7 @@ AC_MSG_NOTICE([])
|
||||
AC_MSG_NOTICE([Drivers])
|
||||
AC_MSG_NOTICE([])
|
||||
LIBVIRT_DRIVER_RESULT_QEMU
|
||||
LIBVIRT_DRIVER_RESULT_UML
|
||||
LIBVIRT_DRIVER_RESULT_OPENVZ
|
||||
LIBVIRT_DRIVER_RESULT_VMWARE
|
||||
LIBVIRT_DRIVER_RESULT_VBOX
|
||||
|
||||
@@ -381,6 +381,10 @@
|
||||
<td>storage</td>
|
||||
<td>storage</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>uml</td>
|
||||
<td>UML</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>vbox</td>
|
||||
<td>VBOX</td>
|
||||
|
||||
@@ -1003,8 +1003,6 @@ class CParser:
|
||||
# skip hidden macros
|
||||
if name in hidden_macros:
|
||||
return token
|
||||
if name[-2:] == "_H" or name[-8:] == "_H_ALLOW":
|
||||
return token
|
||||
|
||||
strValue = None
|
||||
if len(lst) == 1 and lst[0][0] == '"' and lst[0][-1] == '"':
|
||||
@@ -2272,7 +2270,7 @@ class docBuilder:
|
||||
output.write(" <file name='%s'>\n" % (module))
|
||||
dict = self.headers[file]
|
||||
if dict.info is not None:
|
||||
for data in ('Summary', 'Description'):
|
||||
for data in ('Summary', 'Description', 'Author'):
|
||||
try:
|
||||
output.write(" <%s>%s</%s>\n" % (
|
||||
data.lower(),
|
||||
|
||||
@@ -72,6 +72,7 @@
|
||||
<xsl:if test="deprecated">
|
||||
<p> WARNING: this module is deprecated !</p>
|
||||
</xsl:if>
|
||||
<p>Author(s): <xsl:value-of select="author"/></p>
|
||||
<div class="refsynopsisdiv">
|
||||
<h2>Synopsis</h2>
|
||||
<pre class="synopsis">
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
<li><strong><a href="drvopenvz.html">OpenVZ</a></strong></li>
|
||||
<li><strong><a href="drvqemu.html">QEMU</a></strong></li>
|
||||
<li><strong><a href="drvtest.html">Test</a></strong> - Used for testing</li>
|
||||
<li><strong><a href="drvuml.html">UML</a></strong> - User Mode Linux</li>
|
||||
<li><strong><a href="drvvbox.html">VirtualBox</a></strong></li>
|
||||
<li><strong><a href="drvesx.html">VMware ESX</a></strong></li>
|
||||
<li><strong><a href="drvvmware.html">VMware Workstation/Player</a></strong></li>
|
||||
|
||||
93
docs/drvuml.html.in
Normal file
93
docs/drvuml.html.in
Normal file
@@ -0,0 +1,93 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<body>
|
||||
<h1>User Mode Linux driver</h1>
|
||||
|
||||
<p>
|
||||
The UML driver for libvirt allows use and management of paravirtualized
|
||||
guests built for User Mode Linux. UML requires no special support in
|
||||
the host kernel, so can be used by any user of any linux system, provided
|
||||
they have enough free RAM for their guest's needs, though there are
|
||||
certain restrictions on network connectivity unless the administrator
|
||||
has pre-created TAP devices.
|
||||
</p>
|
||||
|
||||
<h2><a id="project">Project Links</a></h2>
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
The <a href="http://user-mode-linux.sourceforge.net/">User
|
||||
Mode Linux</a> paravirtualized kernel
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h2>Connections to UML driver</h2>
|
||||
|
||||
<p>
|
||||
The libvirt UML driver follows the QEMU driver in providing two
|
||||
types of connection. There is one privileged instance per host,
|
||||
which runs as root. This is called the "system" instance, and allows
|
||||
full use of all host resources. Then, there is a per-user unprivileged
|
||||
"session", instance. This has more restricted capabilities, and may
|
||||
require the host administrator to setup certain resources ahead of
|
||||
time to allow full integration with the network. Example connection
|
||||
URIs are
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
uml:///session (local access to per-user instance)
|
||||
uml+unix:///session (local access to per-user instance)
|
||||
|
||||
uml:///system (local access to system instance)
|
||||
uml+unix:///system (local access to system instance)
|
||||
uml://example.com/system (remote access, TLS/x509)
|
||||
uml+tcp://example.com/system (remote access, SASl/Kerberos)
|
||||
uml+ssh://root@example.com/system (remote access, SSH tunnelled)
|
||||
</pre>
|
||||
|
||||
<h2>Example XML configuration</h2>
|
||||
|
||||
<p>
|
||||
User mode Linux driver only supports directly kernel boot at
|
||||
this time. A future driver enhancement may allow a paravirt
|
||||
bootloader in a similar style to Xen's pygrub. For now though,
|
||||
the UML kernel must be stored on the host and referenced
|
||||
explicitly in the "os" element. Since UML is a paravirtualized
|
||||
technology, the kernel "type" is set to "uml"
|
||||
</p>
|
||||
|
||||
<p>
|
||||
There is not yet support for networking in the driver, but
|
||||
disks can be specified in the usual libvirt manner. The main
|
||||
variation is the target device naming scheme "ubd0", and
|
||||
bus type of "uml".
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Once booted the primary console is connected to a PTY, and
|
||||
thus accessible with "virsh console" or equivalent tools
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
<domain type='uml'>
|
||||
<name>demo</name>
|
||||
<uuid>b4433fc2-a22e-ffb3-0a3d-9c173b395800</uuid>
|
||||
<memory>500000</memory>
|
||||
<currentMemory>500000</currentMemory>
|
||||
<vcpu>1</vcpu>
|
||||
<os>
|
||||
<type arch='x86_64'>uml</type>
|
||||
<kernel>/home/berrange/linux-uml-2.6.26-x86_64</kernel>
|
||||
</os>
|
||||
<devices>
|
||||
<disk type='file' device='disk'>
|
||||
<source file='/home/berrange/FedoraCore6-AMD64-root_fs'/>
|
||||
<target dev='ubd0' bus='uml'/>
|
||||
</disk>
|
||||
<console type='pty'/>
|
||||
</devices>
|
||||
</domain>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
@@ -87,6 +87,9 @@
|
||||
|
||||
<dt><code>exe</code></dt>
|
||||
<dd>Container based virtualization</dd>
|
||||
|
||||
<dt><code>uml</code></dt>
|
||||
<dd>User Mode Linux</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
|
||||
|
||||
@@ -1243,9 +1243,9 @@
|
||||
<a href="#elementsMemoryBacking">memory backing</a> because your
|
||||
workload demands it, you'll have to take into account the specifics of
|
||||
your deployment and figure out a value for <code>hard_limit</code> that
|
||||
is large enough to support the memory requirements of your guest, but
|
||||
small enough to protect your host against a malicious guest locking all
|
||||
memory.</dd>
|
||||
balances the risk of your guest being killed because the limit was set
|
||||
too low and the risk of your host crashing because it cannot reclaim
|
||||
the memory used by the guest due to <code>locked</code>. Good luck!</dd>
|
||||
<dt><code>soft_limit</code></dt>
|
||||
<dd> The optional <code>soft_limit</code> element is the memory limit to
|
||||
enforce during memory contention. The units for this value are
|
||||
@@ -6704,17 +6704,12 @@ qemu-kvm -net nic,model=? /dev/null
|
||||
the other types, for practical reasons it should be paired with
|
||||
either <code>vnc</code> or <code>spice</code> graphics types.
|
||||
This display type is only supported by QEMU domains
|
||||
(needs QEMU <span class="since">2.10</span> or newer).
|
||||
<span class="Since">5.0.0</span> this element accepts a
|
||||
<code><gl/></code> sub-element with an optional attribute
|
||||
<code>rendernode</code> which can be used to specify an absolute
|
||||
path to a host's DRI device to be used for OpenGL rendering.
|
||||
(needs QEMU <span class="since">2.10</span> or newer) and doesn't
|
||||
accept any attributes.
|
||||
</p>
|
||||
<pre>
|
||||
<graphics type='spice' autoport='yes'/>
|
||||
<graphics type='egl-headless'>
|
||||
<gl rendernode='/dev/dri/renderD128'/>
|
||||
</graphics>
|
||||
<graphics type='egl-headless'/>
|
||||
</pre>
|
||||
</dd>
|
||||
</dl>
|
||||
@@ -7161,9 +7156,9 @@ qemu-kvm -net nic,model=? /dev/null
|
||||
Valid values for the <code>type</code> attribute are:
|
||||
<code>serial</code> (described below);
|
||||
<code>virtio</code> (usable whenever VirtIO support is available);
|
||||
<code>xen</code>, <code>lxc</code> and <code>openvz</code>
|
||||
(available when the corresponding hypervisor is in use).
|
||||
<code>sclp</code> and <code>sclplm</code> (usable for s390 and
|
||||
<code>xen</code>, <code>lxc</code>, <code>uml</code> and
|
||||
<code>openvz</code> (available when the corresponding hypervisor is in
|
||||
use). <code>sclp</code> and <code>sclplm</code> (usable for s390 and
|
||||
s390x QEMU guests) are supported for compatibility reasons but should
|
||||
not be used for new guests: use the <code>sclpconsole</code> and
|
||||
<code>sclplmconsole</code> target models, respectively, with the
|
||||
@@ -8322,21 +8317,6 @@ qemu-kvm -net nic,model=? /dev/null
|
||||
<memory model='nvdimm'>
|
||||
<source>
|
||||
<path>/tmp/nvdimm</path>
|
||||
<alignsize unit='KiB'>2048</alignsize>
|
||||
</source>
|
||||
<target>
|
||||
<size unit='KiB'>524288</size>
|
||||
<node>1</node>
|
||||
<label>
|
||||
<size unit='KiB'>128</size>
|
||||
</label>
|
||||
<readonly/>
|
||||
</target>
|
||||
</memory>
|
||||
<memory model='nvdimm'>
|
||||
<source>
|
||||
<path>/dev/dax0.0</path>
|
||||
<pmem/>
|
||||
</source>
|
||||
<target>
|
||||
<size unit='KiB'>524288</size>
|
||||
@@ -8418,36 +8398,10 @@ qemu-kvm -net nic,model=? /dev/null
|
||||
</dl>
|
||||
|
||||
<p>
|
||||
For model <code>nvdimm</code> this element is mandatory. The
|
||||
mandatory child element <code>path</code> represents a path in
|
||||
the host that backs the nvdimm module in the guest. The following
|
||||
optional elements may be used:
|
||||
For model <code>nvdimm</code> this element is mandatory and has a
|
||||
single child element <code>path</code> that represents a path
|
||||
in the host that backs the nvdimm module in the guest.
|
||||
</p>
|
||||
|
||||
<dl>
|
||||
<dt><code>alignsize</code></dt>
|
||||
<dd>
|
||||
<p>
|
||||
The <code>alignsize</code> element defines the page size
|
||||
alignment used to mmap the address range for the backend
|
||||
<code>path</code>. If not supplied the host page size is used.
|
||||
For example, to mmap a real NVDIMM device a 2M-aligned page may
|
||||
be required.
|
||||
<span class="since">Since 5.0.0</span>
|
||||
</p>
|
||||
</dd>
|
||||
|
||||
<dt><code>pmem</code></dt>
|
||||
<dd>
|
||||
<p>
|
||||
If persistent memory is supported and enabled by the hypervisor
|
||||
in order to guarantee the persistence of writes to the vNVDIMM
|
||||
backend, then use the <code>pmem</code> element in order to
|
||||
utilize the feature.
|
||||
<span class="since">Since 5.0.0</span>
|
||||
</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
|
||||
<dt><code>target</code></dt>
|
||||
@@ -8466,39 +8420,19 @@ qemu-kvm -net nic,model=? /dev/null
|
||||
NUMA nodes configured.
|
||||
</p>
|
||||
<p>
|
||||
The following optional elements may be used:
|
||||
For NVDIMM type devices one can optionally use
|
||||
<code>label</code> and its subelement <code>size</code>
|
||||
to configure the size of namespaces label storage
|
||||
within the NVDIMM module. The <code>size</code> element
|
||||
has usual meaning described
|
||||
<a href="#elementsMemoryAllocation">here</a>.
|
||||
For QEMU domains the following restrictions apply:
|
||||
</p>
|
||||
|
||||
<dl>
|
||||
<dt><code>label</code></dt>
|
||||
<dd>
|
||||
<p>
|
||||
For NVDIMM type devices one can optionally use
|
||||
<code>label</code> and its subelement <code>size</code>
|
||||
to configure the size of namespaces label storage
|
||||
within the NVDIMM module. The <code>size</code> element
|
||||
has usual meaning described
|
||||
<a href="#elementsMemoryAllocation">here</a>.
|
||||
For QEMU domains the following restrictions apply:
|
||||
</p>
|
||||
<ol>
|
||||
<li>the minimum label size is 128KiB,</li>
|
||||
<li>the remaining size (total-size - label-size) will be aligned
|
||||
to 4KiB as default.</li>
|
||||
</ol>
|
||||
</dd>
|
||||
|
||||
<dt><code>readonly</code></dt>
|
||||
<dd>
|
||||
<p>
|
||||
The <code>readonly</code> element is used to mark the vNVDIMM
|
||||
as read-only. Only the real NVDIMM device backend can guarantee
|
||||
the guest write persistence, so other backend types should use
|
||||
the <code>readonly</code> element.
|
||||
<span class="since">Since 5.0.0</span>
|
||||
</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<ol>
|
||||
<li>the minimum label size is 128KiB,</li>
|
||||
<li>the remaining size (total-size - label-size) has to be aligned to
|
||||
4KiB</li>
|
||||
</ol>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
@@ -278,6 +278,7 @@
|
||||
<value>virtio</value>
|
||||
<value>xen</value>
|
||||
<value>usb</value>
|
||||
<value>uml</value>
|
||||
<value>sata</value>
|
||||
<value>sd</value>
|
||||
</enum>
|
||||
|
||||
@@ -2265,7 +2265,7 @@ echo 3 > /proc/sys/net/netfilter/nf_conntrack_icmp_timeout
|
||||
to the incoming and outgoing direction. All this is related to the ftp
|
||||
data traffic originating from TCP port 20 of the VM. This then leads to
|
||||
the following solution
|
||||
<span class="since">(since 0.8.5 (QEMU, KVM))</span>:
|
||||
<span class="since">(since 0.8.5 (QEMU, KVM, UML))</span>:
|
||||
</p>
|
||||
<pre>
|
||||
<filter name='test-eth0'>
|
||||
|
||||
@@ -426,7 +426,7 @@ dprintf(logfd, "%s: ", timestamp);
|
||||
VIR_FREE(timestamp);
|
||||
virCommandWriteArgLog(cmd, logfd);
|
||||
|
||||
string = virCommandToString(cmd, false);
|
||||
string = virCommandToString(cmd);
|
||||
if (string)
|
||||
VIR_DEBUG("about to run %s", string);
|
||||
VIR_FREE(string);
|
||||
|
||||
@@ -25,19 +25,6 @@
|
||||
<section title="New features">
|
||||
</section>
|
||||
<section title="Improvements">
|
||||
<change>
|
||||
<summary>
|
||||
Start selecting the first available DRI device for OpenGL operations
|
||||
</summary>
|
||||
<description>
|
||||
If OpenGL support is needed (either with SPICE gl enabled or with
|
||||
egl-headless), libvirt is now able to pick the first available DRI
|
||||
device for the job. At the same time, this improvement is also a
|
||||
bugfix as it prevents permission-related issues with regards to our
|
||||
mount namespaces and the default DRI render node's permissions which
|
||||
would normally prevent QEMU from accessing such a device.
|
||||
</description>
|
||||
</change>
|
||||
</section>
|
||||
<section title="Bug fixes">
|
||||
</section>
|
||||
@@ -46,85 +33,6 @@
|
||||
-->
|
||||
|
||||
<libvirt>
|
||||
<release version="v5.0.0" date="unreleased">
|
||||
<section title="New features">
|
||||
<change>
|
||||
<summary>
|
||||
Xen: Add support for openvswitch
|
||||
</summary>
|
||||
<description>
|
||||
The libxl driver now supports virtual interfaces that connect to
|
||||
an openvswitch bridge, including interfaces with VLAN tagging and
|
||||
trunking configuration.
|
||||
</description>
|
||||
</change>
|
||||
</section>
|
||||
<section title="Removed features">
|
||||
<change>
|
||||
<summary>
|
||||
Drop UML driver
|
||||
</summary>
|
||||
<description>
|
||||
The UML driver was unmaintained and not tested for
|
||||
quite some time now. Worse, there is a bug that causes
|
||||
it to deadlock on some very basic operations (e.g.
|
||||
dumping domain XML). These facts make us believe no one
|
||||
uses it.
|
||||
</description>
|
||||
</change>
|
||||
</section>
|
||||
<section title="Improvements">
|
||||
<change>
|
||||
<summary>
|
||||
qemu: Add support for ARMv6l guests
|
||||
</summary>
|
||||
</change>
|
||||
<change>
|
||||
<summary>
|
||||
Remember original owners and SELinux labels of files
|
||||
</summary>
|
||||
<description>
|
||||
When a domain is starting up libvirt changes DAC and
|
||||
SELinux labels so that domain can access it. However,
|
||||
it never remembered the original labels and therefore
|
||||
the file was returned back to <code>root:root</code>.
|
||||
With this release, the original labels are remembered
|
||||
and restored properly.
|
||||
</description>
|
||||
</change>
|
||||
<change>
|
||||
<summary>
|
||||
Support more NVDIMM configuration options
|
||||
</summary>
|
||||
<description>
|
||||
Introduce more configuration options. For the source element, add
|
||||
the 'alignsize' and 'pmem' subelements. For the target element, add
|
||||
the 'readonly' subelement.
|
||||
</description>
|
||||
</change>
|
||||
<change>
|
||||
<summary>
|
||||
cpu: Add support for "stibp" x86_64 feature
|
||||
</summary>
|
||||
<description>
|
||||
Add cpu flag stibp (Single Thread Indirect Branch Predictors) to
|
||||
prevent indirect branch predictions from being controlled by the
|
||||
sibling Hyperthread.
|
||||
</description>
|
||||
</change>
|
||||
<change>
|
||||
<summary>
|
||||
qemu: Add support for postcopy-requests migration statistics
|
||||
</summary>
|
||||
<description>
|
||||
The <code>virDomainJobInfo</code> can get number page requests
|
||||
received from the destination host during post-copy migration.
|
||||
</description>
|
||||
</change>
|
||||
</section>
|
||||
<section title="Bug fixes">
|
||||
</section>
|
||||
</release>
|
||||
<release version="v4.10.0" date="2018-12-03">
|
||||
<section title="New features">
|
||||
<change>
|
||||
|
||||
@@ -17,6 +17,9 @@
|
||||
# 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:
|
||||
# Andrea Bolognani <abologna@redhat.com>
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
|
||||
@@ -406,7 +406,6 @@
|
||||
<choice>
|
||||
<value>aarch64</value>
|
||||
<value>alpha</value>
|
||||
<value>armv6l</value>
|
||||
<value>armv7l</value>
|
||||
<value>cris</value>
|
||||
<value>i686</value>
|
||||
|
||||
@@ -412,7 +412,7 @@
|
||||
but is also used by phyp driver -->
|
||||
<value>hvm</value> <!-- unmodified OS -->
|
||||
<value>exe</value> <!-- For container based virt -->
|
||||
<value>uml</value> <!-- user mode linux; NOT USED ANYMORE -->
|
||||
<value>uml</value> <!-- user mode linux -->
|
||||
</choice>
|
||||
</element>
|
||||
</define>
|
||||
@@ -484,7 +484,7 @@
|
||||
<value>kqemu</value>
|
||||
<value>kvm</value>
|
||||
<value>xen</value>
|
||||
<value>uml</value> <!-- NOT USED ANYMORE -->
|
||||
<value>uml</value>
|
||||
<value>lxc</value>
|
||||
<value>openvz</value>
|
||||
<value>test</value>
|
||||
|
||||
@@ -204,7 +204,7 @@
|
||||
<value>kvm</value>
|
||||
<value>xen</value>
|
||||
<value>lxc</value>
|
||||
<value>uml</value> <!-- NOT USED ANYMORE -->
|
||||
<value>uml</value>
|
||||
<value>openvz</value>
|
||||
<value>test</value>
|
||||
<value>vmware</value>
|
||||
@@ -1907,7 +1907,7 @@
|
||||
<value>virtio</value>
|
||||
<value>xen</value>
|
||||
<value>usb</value>
|
||||
<value>uml</value> <!-- NOT USED ANYMORE -->
|
||||
<value>uml</value>
|
||||
<value>sata</value>
|
||||
<value>sd</value>
|
||||
</choice>
|
||||
@@ -3418,20 +3418,9 @@
|
||||
</attribute>
|
||||
</optional>
|
||||
</group>
|
||||
<group>
|
||||
<attribute name="type">
|
||||
<value>egl-headless</value>
|
||||
</attribute>
|
||||
<optional>
|
||||
<element name="gl">
|
||||
<optional>
|
||||
<attribute name="rendernode">
|
||||
<ref name="absFilePath"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
</element>
|
||||
</optional>
|
||||
</group>
|
||||
<attribute name="type">
|
||||
<value>egl-headless</value>
|
||||
</attribute>
|
||||
</choice>
|
||||
</element>
|
||||
</define>
|
||||
@@ -3725,7 +3714,7 @@
|
||||
<choice>
|
||||
<value>xen</value>
|
||||
<value>serial</value>
|
||||
<value>uml</value> <!-- NOT USED ANYMORE -->
|
||||
<value>uml</value>
|
||||
<value>virtio</value>
|
||||
<value>lxc</value>
|
||||
<value>openvz</value>
|
||||
@@ -5384,21 +5373,9 @@
|
||||
</interleave>
|
||||
</group>
|
||||
<group>
|
||||
<interleave>
|
||||
<element name="path">
|
||||
<ref name="absFilePath"/>
|
||||
</element>
|
||||
<optional>
|
||||
<element name="alignsize">
|
||||
<ref name="scaledInteger"/>
|
||||
</element>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name="pmem">
|
||||
<empty/>
|
||||
</element>
|
||||
</optional>
|
||||
</interleave>
|
||||
<element name="path">
|
||||
<ref name="absFilePath"/>
|
||||
</element>
|
||||
</group>
|
||||
</choice>
|
||||
</element>
|
||||
@@ -5422,11 +5399,6 @@
|
||||
</element>
|
||||
</element>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name="readonly">
|
||||
<empty/>
|
||||
</element>
|
||||
</optional>
|
||||
</interleave>
|
||||
</element>
|
||||
</define>
|
||||
@@ -5498,8 +5470,6 @@
|
||||
<attribute name="iommu">
|
||||
<ref name="virOnOff"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="ats">
|
||||
<ref name="virOnOff"/>
|
||||
</attribute>
|
||||
|
||||
@@ -24,7 +24,9 @@
|
||||
</choice>
|
||||
</attribute>
|
||||
<interleave>
|
||||
<ref name='secret'/>
|
||||
<zeroOrMore>
|
||||
<ref name='secret'/>
|
||||
</zeroOrMore>
|
||||
<optional>
|
||||
<element name='cipher'>
|
||||
<ref name='keycipher'/>
|
||||
|
||||
@@ -19,6 +19,12 @@
|
||||
FILTERS = $(wildcard $(srcdir)/xml/nwfilter/*.xml)
|
||||
|
||||
EXTRA_DIST = \
|
||||
apparmor/TEMPLATE.qemu \
|
||||
apparmor/TEMPLATE.lxc \
|
||||
apparmor/libvirt-qemu \
|
||||
apparmor/libvirt-lxc \
|
||||
apparmor/usr.lib.libvirt.virt-aa-helper \
|
||||
apparmor/usr.sbin.libvirtd \
|
||||
lxcconvert/virt-lxc-convert \
|
||||
polkit/libvirt-acl.rules \
|
||||
$(wildcard $(srcdir)/systemtap/*.stp) \
|
||||
@@ -27,10 +33,10 @@ EXTRA_DIST = \
|
||||
$(wildcard $(srcdir)/xml/test/*.xml)
|
||||
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_builddir)/include -I$(top_srcdir)/include -I$(top_srcdir)
|
||||
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include -I$(top_srcdir) \
|
||||
-I$(top_builddir)/gnulib/lib -I$(top_srcdir)/gnulib/lib
|
||||
LDADD = $(STATIC_BINARIES) $(WARN_CFLAGS) $(COVERAGE_LDFLAGS) \
|
||||
$(top_builddir)/src/libvirt.la \
|
||||
$(top_builddir)/src/libvirt.la $(top_builddir)/gnulib/lib/libgnu.la \
|
||||
$(top_builddir)/src/libvirt-admin.la
|
||||
|
||||
noinst_PROGRAMS=dominfo/info1 dommigrate/dommigrate domsuspend/suspend \
|
||||
@@ -64,6 +70,40 @@ admin_logging_SOURCES = admin/logging.c
|
||||
INSTALL_DATA_LOCAL =
|
||||
UNINSTALL_LOCAL =
|
||||
|
||||
if WITH_APPARMOR_PROFILES
|
||||
apparmordir = $(sysconfdir)/apparmor.d/
|
||||
apparmor_DATA = \
|
||||
apparmor/usr.lib.libvirt.virt-aa-helper \
|
||||
apparmor/usr.sbin.libvirtd \
|
||||
$(NULL)
|
||||
|
||||
abstractionsdir = $(apparmordir)/abstractions
|
||||
abstractions_DATA = \
|
||||
apparmor/libvirt-qemu \
|
||||
apparmor/libvirt-lxc \
|
||||
$(NULL)
|
||||
|
||||
templatesdir = $(apparmordir)/libvirt
|
||||
templates_DATA = \
|
||||
apparmor/TEMPLATE.qemu \
|
||||
apparmor/TEMPLATE.lxc \
|
||||
$(NULL)
|
||||
|
||||
APPARMOR_LOCAL_DIR = "$(DESTDIR)$(apparmordir)/local"
|
||||
install-apparmor-local:
|
||||
$(MKDIR_P) "$(APPARMOR_LOCAL_DIR)"
|
||||
echo "# Site-specific additions and overrides for \
|
||||
'usr.lib.libvirt.virt-aa-helper'" \
|
||||
>"$(APPARMOR_LOCAL_DIR)/usr.lib.libvirt.virt-aa-helper"
|
||||
|
||||
uninstall-apparmor-local:
|
||||
rm -f "$(APPARMOR_LOCAL_DIR)/usr.lib.libvirt.virt-aa-helper"
|
||||
rmdir "$(APPARMOR_LOCAL_DIR)" || :
|
||||
|
||||
INSTALL_DATA_LOCAL += install-apparmor-local
|
||||
UNINSTALL_LOCAL += uninstall-apparmor-local
|
||||
endif WITH_APPARMOR_PROFILES
|
||||
|
||||
if WITH_NWFILTER
|
||||
NWFILTER_DIR = "$(DESTDIR)$(sysconfdir)/libvirt/nwfilter"
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <libvirt/libvirt.h>
|
||||
#include <libvirt/libvirt-admin.h>
|
||||
#include<stdio.h>
|
||||
#include<stdlib.h>
|
||||
#include<libvirt/libvirt.h>
|
||||
#include<libvirt/libvirt-admin.h>
|
||||
|
||||
int main(void)
|
||||
{
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
#define _GNU_SOURCE
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
#include <string.h>
|
||||
#include <libvirt/libvirt-admin.h>
|
||||
#include<stdio.h>
|
||||
#include<stdlib.h>
|
||||
#include<time.h>
|
||||
#include<string.h>
|
||||
#include<libvirt/libvirt-admin.h>
|
||||
|
||||
static const char *
|
||||
exampleTransportToString(int transport)
|
||||
@@ -30,13 +30,9 @@ exampleGetTimeStr(time_t then)
|
||||
{
|
||||
char *ret = NULL;
|
||||
struct tm timeinfo;
|
||||
struct tm *timeinfop;
|
||||
|
||||
/* localtime_r() is smarter, but since mingw lacks it and this
|
||||
* example is single-threaded, we can get away with localtime */
|
||||
if (!(timeinfop = localtime(&then)))
|
||||
if (!localtime_r(&then, &timeinfo))
|
||||
return NULL;
|
||||
timeinfo = *timeinfop;
|
||||
|
||||
if (!(ret = calloc(64, sizeof(char))))
|
||||
return NULL;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <libvirt/libvirt-admin.h>
|
||||
#include<stdio.h>
|
||||
#include<stdlib.h>
|
||||
#include<libvirt/libvirt-admin.h>
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
#include <libvirt/libvirt-admin.h>
|
||||
#include<stdio.h>
|
||||
#include<stdlib.h>
|
||||
#include<time.h>
|
||||
#include<libvirt/libvirt-admin.h>
|
||||
|
||||
static const char *
|
||||
exampleTransportToString(int transport)
|
||||
@@ -28,13 +28,9 @@ exampleGetTimeStr(time_t then)
|
||||
{
|
||||
char *ret = NULL;
|
||||
struct tm timeinfo;
|
||||
struct tm *timeinfop;
|
||||
|
||||
/* localtime_r() is smarter, but since mingw lacks it and this
|
||||
* example is single-threaded, we can get away with localtime */
|
||||
if (!(timeinfop = localtime(&then)))
|
||||
if (!localtime_r(&then, &timeinfo))
|
||||
return NULL;
|
||||
timeinfo = *timeinfop;
|
||||
|
||||
if (!(ret = calloc(64, sizeof(char))))
|
||||
return NULL;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <libvirt/libvirt-admin.h>
|
||||
#include<stdio.h>
|
||||
#include<stdlib.h>
|
||||
#include<libvirt/libvirt-admin.h>
|
||||
|
||||
int main(void)
|
||||
{
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdbool.h>
|
||||
#include<stdio.h>
|
||||
#include<stdlib.h>
|
||||
#include<stdbool.h>
|
||||
|
||||
#include <unistd.h>
|
||||
#include <libvirt/libvirt-admin.h>
|
||||
#include <libvirt/virterror.h>
|
||||
#include "config.h"
|
||||
#include<unistd.h>
|
||||
#include<libvirt/libvirt-admin.h>
|
||||
#include<libvirt/virterror.h>
|
||||
|
||||
static void printHelp(const char *argv0)
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <libvirt/libvirt-admin.h>
|
||||
#include<stdio.h>
|
||||
#include<stdlib.h>
|
||||
#include<libvirt/libvirt-admin.h>
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
* hypervisor and extract domain information.
|
||||
* usage: info1
|
||||
* test: info1
|
||||
* author: Daniel Veillard
|
||||
* copy: see Copyright for the status of this software.
|
||||
*/
|
||||
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
* 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/>.
|
||||
*
|
||||
* Sahid Orentino Ferdjaoui <sahid.ferdjaoui@cloudwatt.com>
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
@@ -17,8 +17,12 @@
|
||||
* 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: Michal Privoznik <mprivozn@redhat.com>
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <errno.h>
|
||||
#include <getopt.h>
|
||||
#include <libvirt/libvirt.h>
|
||||
|
||||
@@ -16,8 +16,12 @@
|
||||
* 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: Michal Privoznik <mprivozn@redhat.com>
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <errno.h>
|
||||
#include <getopt.h>
|
||||
#include <libvirt/libvirt.h>
|
||||
@@ -241,8 +245,7 @@ print_cpu_usage(const char *dom_name,
|
||||
|
||||
if (delim)
|
||||
printf("\t");
|
||||
/* mingw lacks %zu */
|
||||
printf("CPU%u: %.2lf", (unsigned)(cpu + i), usage);
|
||||
printf("CPU%zu: %.2lf", cpu + i, usage);
|
||||
delim = true;
|
||||
}
|
||||
|
||||
@@ -266,6 +269,10 @@ do_top(virConnectPtr conn,
|
||||
int max_id = 0;
|
||||
int nparams = 0, then_nparams = 0, now_nparams = 0;
|
||||
virTypedParameterPtr then_params = NULL, now_params = NULL;
|
||||
struct sigaction action_stop;
|
||||
|
||||
memset(&action_stop, 0, sizeof(action_stop));
|
||||
action_stop.sa_handler = stop;
|
||||
|
||||
/* Lookup the domain */
|
||||
if (!(dom = virDomainLookupByName(conn, dom_name))) {
|
||||
@@ -291,10 +298,8 @@ do_top(virConnectPtr conn,
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
/* The ideal program would use sigaction to set this handler, but
|
||||
* this way is portable to mingw. */
|
||||
signal(SIGTERM, stop);
|
||||
signal(SIGINT, stop);
|
||||
sigaction(SIGTERM, &action_stop, NULL);
|
||||
sigaction(SIGINT, &action_stop, NULL);
|
||||
|
||||
run_top = true;
|
||||
while (run_top) {
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
# License along with this library. If not, see
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# Author: Cedric Bosdonnat <cbosdonnat@suse.com>
|
||||
|
||||
handler_cleanup()
|
||||
{
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
#include <config.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <signal.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
#include <verify.h>
|
||||
|
||||
#define VIR_ENUM_SENTINELS
|
||||
|
||||
#include <libvirt/libvirt.h>
|
||||
@@ -13,14 +17,6 @@
|
||||
#define STREQ(a, b) (strcmp(a, b) == 0)
|
||||
#define NULLSTR(s) ((s) ? (s) : "<null>")
|
||||
|
||||
#if (4 < __GNUC__ + (6 <= __GNUC_MINOR__) \
|
||||
&& (201112L <= __STDC_VERSION__ || !defined __STRICT_ANSI__) \
|
||||
&& !defined __cplusplus)
|
||||
# define verify(cond) _Static_assert(cond, "verify (" #cond ")")
|
||||
#else
|
||||
# define verify(cond)
|
||||
#endif
|
||||
|
||||
#ifndef ATTRIBUTE_UNUSED
|
||||
# define ATTRIBUTE_UNUSED __attribute__((__unused__))
|
||||
#endif
|
||||
@@ -948,11 +944,10 @@ myDomainEventBlockThresholdCallback(virConnectPtr conn ATTRIBUTE_UNUSED,
|
||||
unsigned long long excess,
|
||||
void *opaque ATTRIBUTE_UNUSED)
|
||||
{
|
||||
/* Casts to uint64_t to work around mingw not knowing %lld */
|
||||
printf("%s EVENT: Domain %s(%d) block threshold callback dev '%s'(%s), "
|
||||
"threshold: '%" PRIu64 "', excess: '%" PRIu64 "'",
|
||||
"threshold: '%llu', excess: '%llu'",
|
||||
__func__, virDomainGetName(dom), virDomainGetID(dom),
|
||||
dev, NULLSTR(path), (uint64_t)threshold, (uint64_t)excess);
|
||||
dev, NULLSTR(path), threshold, excess);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1147,8 +1142,13 @@ main(int argc, char **argv)
|
||||
virConnectPtr dconn = NULL;
|
||||
int callback1ret = -1;
|
||||
int callback16ret = -1;
|
||||
struct sigaction action_stop;
|
||||
size_t i;
|
||||
|
||||
memset(&action_stop, 0, sizeof(action_stop));
|
||||
|
||||
action_stop.sa_handler = stop;
|
||||
|
||||
if (argc > 1 && STREQ(argv[1], "--help")) {
|
||||
printf("%s uri\n", argv[0]);
|
||||
goto cleanup;
|
||||
@@ -1179,10 +1179,8 @@ main(int argc, char **argv)
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
/* The ideal program would use sigaction to set this handler, but
|
||||
* this way is portable to mingw. */
|
||||
signal(SIGTERM, stop);
|
||||
signal(SIGINT, stop);
|
||||
sigaction(SIGTERM, &action_stop, NULL);
|
||||
sigaction(SIGINT, &action_stop, NULL);
|
||||
|
||||
printf("Registering event callbacks\n");
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
# License along with this library. If not, see
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# Author: Daniel P. Berrange <berrange@redhat.com>
|
||||
#
|
||||
# This script will monitor all operation of the libvirt event loop
|
||||
# in both client and server. Example output is:
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#
|
||||
# Debug RWLock mechanisms as well.
|
||||
#
|
||||
# Author: Martin Kletzander <mkletzan@redhat.com>
|
||||
|
||||
|
||||
global mx_tolock
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
# License along with this library. If not, see
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# Author: Daniel P. Berrange <berrange@redhat.com>
|
||||
#
|
||||
# This script will monitor all messages sent/received between libvirt
|
||||
# and the QEMU monitor
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
# License along with this library. If not, see
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# Author: Daniel P. Berrange <berrange@redhat.com>
|
||||
#
|
||||
# This script will monitor all RPC messages going in/out of libvirtd and
|
||||
# any connected clients. Example output:
|
||||
|
||||
@@ -27,4 +27,4 @@ noinst_LTLIBRARIES =
|
||||
|
||||
include gnulib.mk
|
||||
|
||||
AM_CPPFLAGS = -I$(top_srcdir)
|
||||
INCLUDES = -I$(top_srcdir) $(GETTEXT_CPPFLAGS)
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
|
||||
include gnulib.mk
|
||||
|
||||
INCLUDES = $(GETTEXT_CPPFLAGS)
|
||||
|
||||
GNULIB_TESTS0 =
|
||||
GNULIB_TESTS1 = $(GNULIB_TESTS)
|
||||
if WITH_EXPENSIVE_TESTS
|
||||
|
||||
@@ -19,10 +19,12 @@
|
||||
* 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: Martin Kletzander <mkletzan@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_ADMIN_H
|
||||
# define LIBVIRT_ADMIN_H
|
||||
#ifndef __VIR_ADMIN_H__
|
||||
# define __VIR_ADMIN_H__
|
||||
|
||||
# ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -422,4 +424,4 @@ int virAdmConnectSetLoggingFilters(virAdmConnectPtr conn,
|
||||
}
|
||||
# endif
|
||||
|
||||
#endif /* LIBVIRT_ADMIN_H */
|
||||
#endif /* __VIR_ADMIN_H__ */
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
* Summary: common macros and enums for the libvirt and libvirt-admin library
|
||||
* Description: Provides common macros and enums needed by both libvirt and
|
||||
* libvirt-admin libraries
|
||||
* Author: Erik Skultety <eskultet@redhat.com>
|
||||
*
|
||||
* Copyright (C) 2015 Red Hat, Inc.
|
||||
*
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
* libvirt-domain-snapshot.h
|
||||
* Summary: APIs for management of domain snapshots
|
||||
* Description: Provides APIs for the management of domain snapshots
|
||||
* Author: Daniel Veillard <veillard@redhat.com>
|
||||
*
|
||||
* Copyright (C) 2006-2014 Red Hat, Inc.
|
||||
*
|
||||
@@ -20,8 +21,8 @@
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_DOMAIN_SNAPSHOT_H
|
||||
# define LIBVIRT_DOMAIN_SNAPSHOT_H
|
||||
#ifndef __VIR_LIBVIRT_DOMAIN_SNAPSHOT_H__
|
||||
# define __VIR_LIBVIRT_DOMAIN_SNAPSHOT_H__
|
||||
|
||||
# ifndef __VIR_LIBVIRT_H_INCLUDES__
|
||||
# error "Don't include this file directly, only use libvirt/libvirt.h"
|
||||
@@ -210,4 +211,4 @@ int virDomainSnapshotDelete(virDomainSnapshotPtr snapshot,
|
||||
int virDomainSnapshotRef(virDomainSnapshotPtr snapshot);
|
||||
int virDomainSnapshotFree(virDomainSnapshotPtr snapshot);
|
||||
|
||||
#endif /* LIBVIRT_DOMAIN_SNAPSHOT_H */
|
||||
#endif /* __VIR_LIBVIRT_DOMAIN_SNAPSHOT_H__ */
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
* libvirt-domain.h
|
||||
* Summary: APIs for management of domains
|
||||
* Description: Provides APIs for the management of domains
|
||||
* Author: Daniel Veillard <veillard@redhat.com>
|
||||
*
|
||||
* Copyright (C) 2006-2015 Red Hat, Inc.
|
||||
*
|
||||
@@ -20,8 +21,8 @@
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_DOMAIN_H
|
||||
# define LIBVIRT_DOMAIN_H
|
||||
#ifndef __VIR_LIBVIRT_DOMAIN_H__
|
||||
# define __VIR_LIBVIRT_DOMAIN_H__
|
||||
|
||||
# ifndef __VIR_LIBVIRT_H_INCLUDES__
|
||||
# error "Don't include this file directly, only use libvirt/libvirt.h"
|
||||
@@ -3422,16 +3423,6 @@ typedef enum {
|
||||
*/
|
||||
# define VIR_DOMAIN_JOB_MEMORY_ITERATION "memory_iteration"
|
||||
|
||||
/**
|
||||
* VIR_DOMAIN_JOB_MEMORY_POSTCOPY_REQS:
|
||||
*
|
||||
* virDomainGetJobStats field: number page requests received from the
|
||||
* destination host during post-copy migration, as VIR_TYPED_PARAM_ULLONG.
|
||||
* This counter is incremented whenever the migrated domain tries to access
|
||||
* a memory page which has not been transferred from the source host yet.
|
||||
*/
|
||||
# define VIR_DOMAIN_JOB_MEMORY_POSTCOPY_REQS "memory_postcopy_requests"
|
||||
|
||||
/**
|
||||
* VIR_DOMAIN_JOB_DISK_TOTAL:
|
||||
*
|
||||
@@ -4849,4 +4840,4 @@ int virDomainGetLaunchSecurityInfo(virDomainPtr domain,
|
||||
int *nparams,
|
||||
unsigned int flags);
|
||||
|
||||
#endif /* LIBVIRT_DOMAIN_H */
|
||||
#endif /* __VIR_LIBVIRT_DOMAIN_H__ */
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
* libvirt-event.h
|
||||
* Summary: APIs for management of events
|
||||
* Description: Provides APIs for the management of events
|
||||
* Author: Daniel Veillard <veillard@redhat.com>
|
||||
*
|
||||
* Copyright (C) 2006-2014 Red Hat, Inc.
|
||||
*
|
||||
@@ -20,8 +21,8 @@
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_EVENT_H
|
||||
# define LIBVIRT_EVENT_H
|
||||
#ifndef __VIR_LIBVIRT_EVENT_H__
|
||||
# define __VIR_LIBVIRT_EVENT_H__
|
||||
|
||||
# ifndef __VIR_LIBVIRT_H_INCLUDES__
|
||||
# error "Don't include this file directly, only use libvirt/libvirt.h"
|
||||
@@ -59,7 +60,7 @@ typedef void (*virEventHandleCallback)(int watch, int fd, int events, void *opaq
|
||||
* virEventAddHandleFunc:
|
||||
* @fd: file descriptor to listen on
|
||||
* @event: bitset of events on which to fire the callback
|
||||
* @cb: the callback to be called when an event occurs
|
||||
* @cb: the callback to be called when an event occurrs
|
||||
* @opaque: user data to pass to the callback
|
||||
* @ff: the callback invoked to free opaque data blob
|
||||
*
|
||||
@@ -186,4 +187,4 @@ void virEventUpdateTimeout(int timer, int frequency);
|
||||
int virEventRemoveTimeout(int timer);
|
||||
|
||||
|
||||
#endif /* LIBVIRT_EVENT_H */
|
||||
#endif /* __VIR_LIBVIRT_EVENT_H__ */
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
* libvirt-host.h
|
||||
* Summary: APIs for management of hosts
|
||||
* Description: Provides APIs for the management of hosts
|
||||
* Author: Daniel Veillard <veillard@redhat.com>
|
||||
*
|
||||
* Copyright (C) 2006-2014 Red Hat, Inc.
|
||||
*
|
||||
@@ -20,8 +21,8 @@
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_HOST_H
|
||||
# define LIBVIRT_HOST_H
|
||||
#ifndef __VIR_LIBVIRT_HOST_H__
|
||||
# define __VIR_LIBVIRT_HOST_H__
|
||||
|
||||
# ifndef __VIR_LIBVIRT_H_INCLUDES__
|
||||
# error "Don't include this file directly, only use libvirt/libvirt.h"
|
||||
@@ -743,4 +744,4 @@ int virNodeAllocPages(virConnectPtr conn,
|
||||
unsigned int flags);
|
||||
|
||||
|
||||
#endif /* LIBVIRT_HOST_H */
|
||||
#endif /* __VIR_LIBVIRT_HOST_H__ */
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
* libvirt-interface.h
|
||||
* Summary: APIs for management of interfaces
|
||||
* Description: Provides APIs for the management of interfaces
|
||||
* Author: Daniel Veillard <veillard@redhat.com>
|
||||
*
|
||||
* Copyright (C) 2006-2014 Red Hat, Inc.
|
||||
*
|
||||
@@ -20,8 +21,8 @@
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_INTERFACE_H
|
||||
# define LIBVIRT_INTERFACE_H
|
||||
#ifndef __VIR_LIBVIRT_INTERFACE_H__
|
||||
# define __VIR_LIBVIRT_INTERFACE_H__
|
||||
|
||||
# ifndef __VIR_LIBVIRT_H_INCLUDES__
|
||||
# error "Don't include this file directly, only use libvirt/libvirt.h"
|
||||
@@ -106,4 +107,4 @@ int virInterfaceChangeRollback(virConnectPtr conn,
|
||||
int virInterfaceIsActive(virInterfacePtr iface);
|
||||
|
||||
|
||||
#endif /* LIBVIRT_INTERFACE_H */
|
||||
#endif /* __VIR_LIBVIRT_INTERFACE_H__ */
|
||||
|
||||
@@ -19,10 +19,12 @@
|
||||
* 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 P. Berrange <berrange@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_LXC_H
|
||||
# define LIBVIRT_LXC_H
|
||||
#ifndef __VIR_LXC_H__
|
||||
# define __VIR_LXC_H__
|
||||
|
||||
# include <libvirt/libvirt.h>
|
||||
|
||||
@@ -51,4 +53,4 @@ int virDomainLxcEnterCGroup(virDomainPtr domain,
|
||||
}
|
||||
# endif
|
||||
|
||||
#endif /* LIBVIRT_LXC_H */
|
||||
#endif /* __VIR_LXC_H__ */
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
* libvirt-network.h
|
||||
* Summary: APIs for management of networks
|
||||
* Description: Provides APIs for the management of networks
|
||||
* Author: Daniel Veillard <veillard@redhat.com>
|
||||
*
|
||||
* Copyright (C) 2006-2014 Red Hat, Inc.
|
||||
*
|
||||
@@ -20,8 +21,8 @@
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_NETWORK_H
|
||||
# define LIBVIRT_NETWORK_H
|
||||
#ifndef __VIR_LIBVIRT_NETWORK_H__
|
||||
# define __VIR_LIBVIRT_NETWORK_H__
|
||||
|
||||
# ifndef __VIR_LIBVIRT_H_INCLUDES__
|
||||
# error "Don't include this file directly, only use libvirt/libvirt.h"
|
||||
@@ -333,4 +334,4 @@ int virConnectNetworkEventRegisterAny(virConnectPtr conn,
|
||||
int virConnectNetworkEventDeregisterAny(virConnectPtr conn,
|
||||
int callbackID);
|
||||
|
||||
#endif /* LIBVIRT_NETWORK_H */
|
||||
#endif /* __VIR_LIBVIRT_NETWORK_H__ */
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
* libvirt-nodedev.h
|
||||
* Summary: APIs for management of nodedevs
|
||||
* Description: Provides APIs for the management of nodedevs
|
||||
* Author: Daniel Veillard <veillard@redhat.com>
|
||||
*
|
||||
* Copyright (C) 2006-2014 Red Hat, Inc.
|
||||
*
|
||||
@@ -20,8 +21,8 @@
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_NODEDEV_H
|
||||
# define LIBVIRT_NODEDEV_H
|
||||
#ifndef __VIR_LIBVIRT_NODEDEV_H__
|
||||
# define __VIR_LIBVIRT_NODEDEV_H__
|
||||
|
||||
# ifndef __VIR_LIBVIRT_H_INCLUDES__
|
||||
# error "Don't include this file directly, only use libvirt/libvirt.h"
|
||||
@@ -216,4 +217,4 @@ typedef void (*virConnectNodeDeviceEventLifecycleCallback)(virConnectPtr conn,
|
||||
int detail,
|
||||
void *opaque);
|
||||
|
||||
#endif /* LIBVIRT_NODEDEV_H */
|
||||
#endif /* __VIR_LIBVIRT_NODEDEV_H__ */
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
* libvirt-nwfilter.h
|
||||
* Summary: APIs for management of nwfilters
|
||||
* Description: Provides APIs for the management of nwfilters
|
||||
* Author: Daniel Veillard <veillard@redhat.com>
|
||||
*
|
||||
* Copyright (C) 2006-2014 Red Hat, Inc.
|
||||
*
|
||||
@@ -20,8 +21,8 @@
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_NWFILTER_H
|
||||
# define LIBVIRT_NWFILTER_H
|
||||
#ifndef __VIR_LIBVIRT_NWFILTER_H__
|
||||
# define __VIR_LIBVIRT_NWFILTER_H__
|
||||
|
||||
# ifndef __VIR_LIBVIRT_H_INCLUDES__
|
||||
# error "Don't include this file directly, only use libvirt/libvirt.h"
|
||||
@@ -130,4 +131,4 @@ int virNWFilterBindingDelete(virNWFilterBindingPtr binding);
|
||||
int virNWFilterBindingRef(virNWFilterBindingPtr binding);
|
||||
int virNWFilterBindingFree(virNWFilterBindingPtr binding);
|
||||
|
||||
#endif /* LIBVIRT_NWFILTER_H */
|
||||
#endif /* __VIR_LIBVIRT_NWFILTER_H__ */
|
||||
|
||||
@@ -19,10 +19,12 @@
|
||||
* 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@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_QEMU_H
|
||||
# define LIBVIRT_QEMU_H
|
||||
#ifndef __VIR_QEMU_H__
|
||||
# define __VIR_QEMU_H__
|
||||
|
||||
# include <libvirt/libvirt.h>
|
||||
|
||||
@@ -101,4 +103,4 @@ int virConnectDomainQemuMonitorEventDeregister(virConnectPtr conn,
|
||||
}
|
||||
# endif
|
||||
|
||||
#endif /* LIBVIRT_QEMU_H */
|
||||
#endif /* __VIR_QEMU_H__ */
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
* libvirt-secret.h
|
||||
* Summary: APIs for management of secrets
|
||||
* Description: Provides APIs for the management of secrets
|
||||
* Author: Daniel Veillard <veillard@redhat.com>
|
||||
*
|
||||
* Copyright (C) 2006-2014, 2016 Red Hat, Inc.
|
||||
*
|
||||
@@ -20,8 +21,8 @@
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_SECRET_H
|
||||
# define LIBVIRT_SECRET_H
|
||||
#ifndef __VIR_LIBVIRT_SECRET_H__
|
||||
# define __VIR_LIBVIRT_SECRET_H__
|
||||
|
||||
# ifndef __VIR_LIBVIRT_H_INCLUDES__
|
||||
# error "Don't include this file directly, only use libvirt/libvirt.h"
|
||||
@@ -202,4 +203,4 @@ typedef void (*virConnectSecretEventLifecycleCallback)(virConnectPtr conn,
|
||||
void *opaque);
|
||||
|
||||
|
||||
#endif /* LIBVIRT_SECRET_H */
|
||||
#endif /* __VIR_LIBVIRT_SECRET_H__ */
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
* libvirt-storage.h
|
||||
* Summary: APIs for management of storage pools and volumes
|
||||
* Description: Provides APIs for the management of storage pools and volumes
|
||||
* Author: Daniel Veillard <veillard@redhat.com>
|
||||
*
|
||||
* Copyright (C) 2006-2016 Red Hat, Inc.
|
||||
*
|
||||
@@ -20,8 +21,8 @@
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_STORAGE_H
|
||||
# define LIBVIRT_STORAGE_H
|
||||
#ifndef __VIR_LIBVIRT_STORAGE_H__
|
||||
# define __VIR_LIBVIRT_STORAGE_H__
|
||||
|
||||
# ifndef __VIR_LIBVIRT_H_INCLUDES__
|
||||
# error "Don't include this file directly, only use libvirt/libvirt.h"
|
||||
@@ -495,4 +496,4 @@ typedef void (*virConnectStoragePoolEventLifecycleCallback)(virConnectPtr conn,
|
||||
int detail,
|
||||
void *opaque);
|
||||
|
||||
#endif /* LIBVIRT_STORAGE_H */
|
||||
#endif /* __VIR_LIBVIRT_STORAGE_H__ */
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
* libvirt-stream.h
|
||||
* Summary: APIs for management of streams
|
||||
* Description: Provides APIs for the management of streams
|
||||
* Author: Daniel Veillard <veillard@redhat.com>
|
||||
*
|
||||
* Copyright (C) 2006-2014 Red Hat, Inc.
|
||||
*
|
||||
@@ -20,8 +21,8 @@
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_STREAM_H
|
||||
# define LIBVIRT_STREAM_H
|
||||
#ifndef __VIR_LIBVIRT_STREAM_H__
|
||||
# define __VIR_LIBVIRT_STREAM_H__
|
||||
|
||||
# ifndef __VIR_LIBVIRT_H_INCLUDES__
|
||||
# error "Don't include this file directly, only use libvirt/libvirt.h"
|
||||
@@ -266,4 +267,4 @@ int virStreamAbort(virStreamPtr st);
|
||||
|
||||
int virStreamFree(virStreamPtr st);
|
||||
|
||||
#endif /* LIBVIRT_STREAM_H */
|
||||
#endif /* __VIR_LIBVIRT_STREAM_H__ */
|
||||
|
||||
@@ -19,10 +19,12 @@
|
||||
* 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@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_H
|
||||
# define LIBVIRT_H
|
||||
#ifndef __VIR_VIRLIB_H__
|
||||
# define __VIR_VIRLIB_H__
|
||||
|
||||
# include <sys/types.h>
|
||||
|
||||
@@ -49,4 +51,4 @@ extern "C" {
|
||||
}
|
||||
# endif
|
||||
|
||||
#endif /* LIBVIRT_H */
|
||||
#endif /* __VIR_VIRLIB_H__ */
|
||||
|
||||
@@ -19,10 +19,12 @@
|
||||
* 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@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_VIRTERROR_H
|
||||
# define LIBVIRT_VIRTERROR_H
|
||||
#ifndef __VIR_VIRERR_H__
|
||||
# define __VIR_VIRERR_H__
|
||||
|
||||
# include <libvirt/libvirt.h>
|
||||
|
||||
@@ -74,7 +76,7 @@ typedef enum {
|
||||
VIR_FROM_NETWORK = 19, /* Error from network config */
|
||||
|
||||
VIR_FROM_DOMAIN = 20, /* Error from domain config */
|
||||
VIR_FROM_UML = 21, /* Error at the UML driver; unused since 5.0.0 */
|
||||
VIR_FROM_UML = 21, /* Error at the UML driver */
|
||||
VIR_FROM_NODEDEV = 22, /* Error from node device monitor */
|
||||
VIR_FROM_XEN_INOTIFY = 23, /* Error from xen inotify layer */
|
||||
VIR_FROM_SECURITY = 24, /* Error from security framework */
|
||||
@@ -321,11 +323,6 @@ typedef enum {
|
||||
VIR_ERR_DEVICE_MISSING = 99, /* fail to find the desired device */
|
||||
VIR_ERR_INVALID_NWFILTER_BINDING = 100, /* invalid nwfilter binding */
|
||||
VIR_ERR_NO_NWFILTER_BINDING = 101, /* no nwfilter binding */
|
||||
|
||||
# ifdef VIR_ENUM_SENTINELS
|
||||
VIR_ERR_NUMBER_LAST
|
||||
# endif
|
||||
|
||||
} virErrorNumber;
|
||||
|
||||
/**
|
||||
@@ -369,4 +366,4 @@ int virConnCopyLastError (virConnectPtr conn,
|
||||
}
|
||||
# endif
|
||||
|
||||
#endif /* LIBVIRT_VIRTERROR_H */
|
||||
#endif /* __VIR_VIRERR_H__ */
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
# The hypervisor drivers that run in libvirtd
|
||||
%define with_qemu 0%{!?_without_qemu:1}
|
||||
%define with_lxc 0%{!?_without_lxc:1}
|
||||
%define with_uml 0%{!?_without_uml:1}
|
||||
%define with_libxl 0%{!?_without_libxl:1}
|
||||
%define with_vbox 0%{!?_without_vbox:1}
|
||||
|
||||
@@ -110,12 +111,13 @@
|
||||
%endif
|
||||
|
||||
|
||||
# RHEL doesn't ship OpenVZ, VBox, PowerHypervisor,
|
||||
# RHEL doesn't ship OpenVZ, VBox, UML, PowerHypervisor,
|
||||
# VMware, libxenserver (xenapi), libxenlight (Xen 4.1 and newer),
|
||||
# or HyperV.
|
||||
%if 0%{?rhel}
|
||||
%define with_openvz 0
|
||||
%define with_vbox 0
|
||||
%define with_uml 0
|
||||
%define with_phyp 0
|
||||
%define with_vmware 0
|
||||
%define with_xenapi 0
|
||||
@@ -176,7 +178,7 @@
|
||||
%endif
|
||||
|
||||
|
||||
%if %{with_qemu} || %{with_lxc}
|
||||
%if %{with_qemu} || %{with_lxc} || %{with_uml}
|
||||
# numad is used to manage the CPU and memory placement dynamically,
|
||||
# it's not available on many non-x86 architectures.
|
||||
%ifnarch s390 s390x %{arm} riscv64
|
||||
@@ -229,9 +231,9 @@ Requires: libvirt-daemon-driver-lxc = %{version}-%{release}
|
||||
%if %{with_qemu}
|
||||
Requires: libvirt-daemon-driver-qemu = %{version}-%{release}
|
||||
%endif
|
||||
# We had UML driver, but we've removed it.
|
||||
Obsoletes: libvirt-daemon-driver-uml <= 5.0.0
|
||||
Obsoletes: libvirt-daemon-uml <= 5.0.0
|
||||
%if %{with_uml}
|
||||
Requires: libvirt-daemon-driver-uml = %{version}-%{release}
|
||||
%endif
|
||||
%if %{with_vbox}
|
||||
Requires: libvirt-daemon-driver-vbox = %{version}-%{release}
|
||||
%endif
|
||||
@@ -741,6 +743,19 @@ the Linux kernel
|
||||
%endif
|
||||
|
||||
|
||||
%if %{with_uml}
|
||||
%package daemon-driver-uml
|
||||
Summary: Uml driver plugin for the libvirtd daemon
|
||||
Requires: libvirt-daemon = %{version}-%{release}
|
||||
Requires: libvirt-libs = %{version}-%{release}
|
||||
|
||||
%description daemon-driver-uml
|
||||
The UML driver plugin for the libvirtd daemon, providing
|
||||
an implementation of the hypervisor driver APIs using
|
||||
User Mode Linux
|
||||
%endif
|
||||
|
||||
|
||||
%if %{with_vbox}
|
||||
%package daemon-driver-vbox
|
||||
Summary: VirtualBox driver plugin for the libvirtd daemon
|
||||
@@ -828,6 +843,26 @@ capabilities of LXC
|
||||
%endif
|
||||
|
||||
|
||||
%if %{with_uml}
|
||||
%package daemon-uml
|
||||
Summary: Server side daemon & driver required to run UML guests
|
||||
|
||||
Requires: libvirt-daemon = %{version}-%{release}
|
||||
Requires: libvirt-daemon-driver-uml = %{version}-%{release}
|
||||
Requires: libvirt-daemon-driver-interface = %{version}-%{release}
|
||||
Requires: libvirt-daemon-driver-network = %{version}-%{release}
|
||||
Requires: libvirt-daemon-driver-nodedev = %{version}-%{release}
|
||||
Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release}
|
||||
Requires: libvirt-daemon-driver-secret = %{version}-%{release}
|
||||
Requires: libvirt-daemon-driver-storage = %{version}-%{release}
|
||||
# There are no UML kernel RPMs in Fedora/RHEL to depend on.
|
||||
|
||||
%description daemon-uml
|
||||
Server side daemon and driver required to manage the virtualization
|
||||
capabilities of UML
|
||||
%endif
|
||||
|
||||
|
||||
%if %{with_libxl}
|
||||
%package daemon-xen
|
||||
Summary: Server side daemon & driver required to run XEN guests
|
||||
@@ -1033,6 +1068,12 @@ exit 1
|
||||
%define arg_vmware --without-vmware
|
||||
%endif
|
||||
|
||||
%if %{with_uml}
|
||||
%define arg_uml --with-uml
|
||||
%else
|
||||
%define arg_uml --without-uml
|
||||
%endif
|
||||
|
||||
%if %{with_storage_rbd}
|
||||
%define arg_storage_rbd --with-storage-rbd
|
||||
%else
|
||||
@@ -1146,6 +1187,7 @@ rm -f po/stamp-po
|
||||
--with-avahi \
|
||||
--with-polkit \
|
||||
--with-libvirtd \
|
||||
%{?arg_uml} \
|
||||
%{?arg_phyp} \
|
||||
%{?arg_esx} \
|
||||
%{?arg_hyperv} \
|
||||
@@ -1274,6 +1316,9 @@ rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/libvirtd.libxl
|
||||
rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/libvirtd_libxl.aug
|
||||
rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/tests/test_libvirtd_libxl.aug
|
||||
%endif
|
||||
%if ! %{with_uml}
|
||||
rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/libvirtd.uml
|
||||
%endif
|
||||
|
||||
# Copied into libvirt-docs subpackage eventually
|
||||
mv $RPM_BUILD_ROOT%{_datadir}/doc/libvirt-%{version} libvirt-docs
|
||||
@@ -1680,6 +1725,15 @@ exit 0
|
||||
%{_libdir}/%{name}/connection-driver/libvirt_driver_lxc.so
|
||||
%endif
|
||||
|
||||
%if %{with_uml}
|
||||
%files daemon-driver-uml
|
||||
%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/uml/
|
||||
%config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd.uml
|
||||
%ghost %dir %{_localstatedir}/run/libvirt/uml/
|
||||
%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/uml/
|
||||
%{_libdir}/%{name}/connection-driver/libvirt_driver_uml.so
|
||||
%endif
|
||||
|
||||
%if %{with_libxl}
|
||||
%files daemon-driver-libxl
|
||||
%config(noreplace) %{_sysconfdir}/libvirt/libxl.conf
|
||||
@@ -1710,6 +1764,10 @@ exit 0
|
||||
%files daemon-lxc
|
||||
%endif
|
||||
|
||||
%if %{with_uml}
|
||||
%files daemon-uml
|
||||
%endif
|
||||
|
||||
%if %{with_libxl}
|
||||
%files daemon-xen
|
||||
%endif
|
||||
|
||||
54
m4/virt-driver-uml.m4
Normal file
54
m4/virt-driver-uml.m4
Normal file
@@ -0,0 +1,54 @@
|
||||
dnl The UML driver
|
||||
dnl
|
||||
dnl Copyright (C) 2005-2015 Red Hat, Inc.
|
||||
dnl
|
||||
dnl This library is free software; you can redistribute it and/or
|
||||
dnl modify it under the terms of the GNU Lesser General Public
|
||||
dnl License as published by the Free Software Foundation; either
|
||||
dnl version 2.1 of the License, or (at your option) any later version.
|
||||
dnl
|
||||
dnl This library is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
dnl Lesser General Public License for more details.
|
||||
dnl
|
||||
dnl You should have received a copy of the GNU Lesser General Public
|
||||
dnl License along with this library. If not, see
|
||||
dnl <http://www.gnu.org/licenses/>.
|
||||
dnl
|
||||
|
||||
AC_DEFUN([LIBVIRT_DRIVER_ARG_UML],[
|
||||
LIBVIRT_ARG_WITH_FEATURE([UML], [UML], [check])
|
||||
])
|
||||
|
||||
AC_DEFUN([LIBVIRT_DRIVER_CHECK_UML],[
|
||||
if test "$with_libvirtd" = "no" || test "$with_linux" = "no"; then
|
||||
if test "$with_uml" = "yes"; then
|
||||
AC_MSG_ERROR([The UML driver cannot be enabled])
|
||||
elif test "$with_uml" = "check"; then
|
||||
with_uml="no"
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$with_uml" = "yes" || test "$with_uml" = "check"; then
|
||||
AC_CHECK_HEADER([sys/inotify.h], [
|
||||
with_uml=yes
|
||||
], [
|
||||
if test "$with_uml" = "check"; then
|
||||
with_uml=no
|
||||
AC_MSG_NOTICE([<sys/inotify.h> is required for the UML driver, disabling it])
|
||||
else
|
||||
AC_MSG_ERROR([The <sys/inotify.h> is required for the UML driver. Upgrade your libc6.])
|
||||
fi
|
||||
])
|
||||
fi
|
||||
|
||||
if test "$with_uml" = "yes" ; then
|
||||
AC_DEFINE_UNQUOTED([WITH_UML], 1, [whether UML driver is enabled])
|
||||
fi
|
||||
AM_CONDITIONAL([WITH_UML], [test "$with_uml" = "yes"])
|
||||
])
|
||||
|
||||
AC_DEFUN([LIBVIRT_DRIVER_RESULT_UML],[
|
||||
LIBVIRT_RESULT([UML], [$with_uml])
|
||||
])
|
||||
@@ -177,6 +177,7 @@ autoreconf -if
|
||||
--without-avahi \
|
||||
--without-polkit \
|
||||
--without-libvirtd \
|
||||
--without-uml \
|
||||
%{?_without_phyp} \
|
||||
%{?_without_esx} \
|
||||
%{?_without_hyperv} \
|
||||
|
||||
@@ -190,6 +190,8 @@ src/storage/storage_backend_zfs.c
|
||||
src/storage/storage_driver.c
|
||||
src/storage/storage_util.c
|
||||
src/test/test_driver.c
|
||||
src/uml/uml_conf.c
|
||||
src/uml/uml_driver.c
|
||||
src/util/iohelper.c
|
||||
src/util/viralloc.c
|
||||
src/util/virarptable.c
|
||||
|
||||
@@ -24,8 +24,8 @@ abs_topsrcdir = $(shell cd $(top_srcdir) && pwd)
|
||||
|
||||
# No libraries with the exception of LIBXML should be listed
|
||||
# here. List them against the individual XXX_la_CFLAGS targets
|
||||
# that actually use them.
|
||||
AM_CPPFLAGS = -I../gnulib/lib \
|
||||
# that actually use them. Also keep GETTEXT_CPPFLAGS at the end.
|
||||
INCLUDES = -I../gnulib/lib \
|
||||
-I$(top_srcdir)/gnulib/lib \
|
||||
-I$(top_srcdir) \
|
||||
-I../include \
|
||||
@@ -35,7 +35,7 @@ AM_CPPFLAGS = -I../gnulib/lib \
|
||||
-DIN_LIBVIRT \
|
||||
-Dabs_topbuilddir="\"$(abs_topbuilddir)\"" \
|
||||
-Dabs_topsrcdir="\"$(abs_topsrcdir)\"" \
|
||||
$(NULL)
|
||||
$(GETTEXT_CPPFLAGS)
|
||||
|
||||
WARN_CFLAGS += $(STRICT_FRAME_LIMIT_CFLAGS)
|
||||
|
||||
@@ -72,8 +72,6 @@ STATEFUL_DRIVER_SOURCE_FILES =
|
||||
noinst_LTLIBRARIES =
|
||||
mod_LTLIBRARIES =
|
||||
INSTALL_DATA_DIRS =
|
||||
INSTALL_DATA_LOCAL =
|
||||
UNINSTALL_LOCAL =
|
||||
libvirt_la_BUILT_LIBADD =
|
||||
SYM_FILES =
|
||||
USED_SYM_FILES =
|
||||
@@ -109,6 +107,7 @@ include logging/Makefile.inc.am
|
||||
include locking/Makefile.inc.am
|
||||
include admin/Makefile.inc.am
|
||||
include rpc/Makefile.inc.am
|
||||
include uml/Makefile.inc.am
|
||||
include phyp/Makefile.inc.am
|
||||
include test/Makefile.inc.am
|
||||
include esx/Makefile.inc.am
|
||||
@@ -807,33 +806,29 @@ install-logrotate: $(LOGROTATE_FILES)
|
||||
uninstall-logrotate:
|
||||
rm -f $(LOGROTATE_FILES:%.logrotate=$(DESTDIR)$(sysconfdir)/logrotate.d/%)
|
||||
rmdir $(DESTDIR)$(sysconfdir)/logrotate.d || :
|
||||
else ! WITH_LIBVIRTD
|
||||
install-logrotate:
|
||||
uninstall-logrotate:
|
||||
endif ! WITH_LIBVIRTD
|
||||
|
||||
INSTALL_DATA_LOCAL += install-logrotate
|
||||
UNINSTALL_LOCAL += uninstall-logrotate
|
||||
endif WITH_LIBVIRTD
|
||||
|
||||
if WITH_LIBVIRTD
|
||||
if LIBVIRT_INIT_SCRIPT_RED_HAT
|
||||
initdir = $(sysconfdir)/rc.d/init.d
|
||||
|
||||
install-init:: $(SYSVINIT_FILES) install-sysconfig
|
||||
$(MKDIR_P) $(DESTDIR)$(initdir)
|
||||
$(MKDIR_P) $(DESTDIR)$(sysconfdir)/rc.d/init.d
|
||||
for f in $(SYSVINIT_FILES:%.init=%) ; \
|
||||
do \
|
||||
$(INSTALL_SCRIPT) $$f.init $(DESTDIR)$(initdir)/$$f; \
|
||||
$(INSTALL_SCRIPT) $$f.init $(DESTDIR)$(sysconfdir)/rc.d/init.d/$$f; \
|
||||
done
|
||||
|
||||
uninstall-init:: uninstall-sysconfig
|
||||
rm -f $(SYSVINIT_FILES:%.init=$(DESTDIR)$(initdir)/%)
|
||||
rmdir $(DESTDIR)$(initdir) || :
|
||||
rm -f $(SYSVINIT_FILES:%.init=$(DESTDIR)$(sysconfdir)/rc.d/init.d/%)
|
||||
rmdir $(DESTDIR)$(sysconfdir)/rc.d/init.d || :
|
||||
|
||||
BUILT_SOURCES += $(SYSVINIT_FILES)
|
||||
DISTCLEANFILES += $(SYSVINIT_FILES)
|
||||
|
||||
INSTALL_DATA_LOCAL += install-init
|
||||
UNINSTALL_LOCAL += uninstall-init
|
||||
endif LIBVIRT_INIT_SCRIPT_RED_HAT
|
||||
endif WITH_LIBVIRTD
|
||||
else ! LIBVIRT_INIT_SCRIPT_RED_HAT
|
||||
install-init::
|
||||
uninstall-init::
|
||||
endif ! LIBVIRT_INIT_SCRIPT_RED_HAT
|
||||
|
||||
|
||||
%.8: %.8.in $(top_srcdir)/configure.ac
|
||||
@@ -872,11 +867,14 @@ install-systemd: $(SYSTEMD_UNIT_FILES) install-sysconfig
|
||||
uninstall-systemd: uninstall-sysconfig
|
||||
rm -f $(SYSTEMD_UNIT_FILES:%=$(DESTDIR)$(SYSTEMD_UNIT_DIR)/%)
|
||||
rmdir $(DESTDIR)$(SYSTEMD_UNIT_DIR) || :
|
||||
|
||||
INSTALL_DATA_LOCAL += install-systemd
|
||||
UNINSTALL_LOCAL += uninstall-systemd
|
||||
endif LIBVIRT_INIT_SCRIPT_SYSTEMD
|
||||
endif WITH_LIBVIRTD
|
||||
else ! LIBVIRT_INIT_SCRIPT_SYSTEMD
|
||||
install-systemd:
|
||||
uninstall-systemd:
|
||||
endif ! LIBVIRT_INIT_SCRIPT_SYSTEMD
|
||||
else ! WITH_LIBVIRTD
|
||||
install-systemd:
|
||||
uninstall-systemd:
|
||||
endif ! WITH_LIBVIRTD
|
||||
|
||||
|
||||
EXTRA_DIST += $(UPSTART_FILES)
|
||||
@@ -900,11 +898,14 @@ uninstall-upstart: uninstall-sysconfig
|
||||
rm -f $(DESTDIR)$(sysconfdir)/event.d/$$tgt ; \
|
||||
done
|
||||
rmdir $(DESTDIR)$(sysconfdir)/event.d || :
|
||||
|
||||
INSTALL_DATA_LOCAL += install-upstart
|
||||
UNINSTALL_LOCAL += uninstall-upstart
|
||||
endif LIBVIRT_INIT_SCRIPT_UPSTART
|
||||
endif WITH_LIBVIRTD
|
||||
else ! LIBVIRT_INIT_SCRIPT_UPSTART
|
||||
install-upstart:
|
||||
uninstall-upstart:
|
||||
endif ! LIBVIRT_INIT_SCRIPT_UPSTART
|
||||
else ! WITH_LIBVIRTD
|
||||
install-upstart:
|
||||
uninstall-upstart:
|
||||
endif ! WITH_LIBVIRTD
|
||||
|
||||
|
||||
EXTRA_DIST += dtrace2systemtap.pl
|
||||
@@ -1003,15 +1004,17 @@ libvirt_nss_la_LIBADD = \
|
||||
endif WITH_NSS
|
||||
|
||||
|
||||
install-data-local: $(INSTALL_DATA_LOCAL) \
|
||||
$(INSTALL_DATA_DIRS:%=install-data-%)
|
||||
install-data-local: install-init install-systemd install-upstart \
|
||||
install-sysctl install-polkit install-sasl \
|
||||
install-logrotate $(INSTALL_DATA_DIRS:%=install-data-%)
|
||||
$(MKDIR_P) "$(DESTDIR)$(localstatedir)/cache/libvirt"
|
||||
$(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/images"
|
||||
$(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/filesystems"
|
||||
$(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/boot"
|
||||
|
||||
uninstall-local:: $(UNINSTALL_LOCAL) \
|
||||
$(INSTALL_DATA_DIRS:%=uninstall-data-%)
|
||||
uninstall-local:: uninstall-init uninstall-systemd uninstall-upstart \
|
||||
uninstall-sysctl uninstall-polkit uninstall-sasl \
|
||||
uninstall-logrotate $(INSTALL_DATA_DIRS:%=uninstall-data-%)
|
||||
rmdir "$(DESTDIR)$(localstatedir)/cache/libvirt" ||:
|
||||
rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/images" ||:
|
||||
rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/filesystems" ||:
|
||||
|
||||
@@ -34,6 +34,7 @@ Then there are the hypervisor implementations:
|
||||
* qemu/ - QEMU / KVM using qemu CLI/monitor
|
||||
* remote/ - Generic libvirt native RPC client
|
||||
* test/ - A "mock" driver for testing
|
||||
* uml/ - User Mode Linux
|
||||
* vbox/ - Virtual Box using native API
|
||||
* vmware/ - VMware Workstation and Player using the vmrun tool
|
||||
* xen/ - Xen using hypercalls, XenD SEXPR & XenStore
|
||||
@@ -41,7 +42,7 @@ Then there are the hypervisor implementations:
|
||||
|
||||
|
||||
Finally some secondary drivers that are shared for several HVs.
|
||||
Currently these are used by LXC, OpenVZ, QEMU and Xen drivers.
|
||||
Currently these are used by LXC, OpenVZ, QEMU, UML and Xen drivers.
|
||||
The ESX, Hyper-V, Power Hypervisor, Remote, Test & VirtualBox drivers all
|
||||
implement the secondary drivers directly
|
||||
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_VIRACCESSDRIVER_H
|
||||
# define LIBVIRT_VIRACCESSDRIVER_H
|
||||
#ifndef __VIR_ACCESS_DRIVER_H__
|
||||
# define __VIR_ACCESS_DRIVER_H__
|
||||
|
||||
# include "conf/domain_conf.h"
|
||||
# include "access/viraccessmanager.h"
|
||||
@@ -91,4 +91,4 @@ struct _virAccessDriver {
|
||||
};
|
||||
|
||||
|
||||
#endif /* LIBVIRT_VIRACCESSDRIVER_H */
|
||||
#endif /* __VIR_ACCESS_DRIVER_H__ */
|
||||
|
||||
@@ -18,11 +18,11 @@
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_VIRACCESSDRIVERNOP_H
|
||||
# define LIBVIRT_VIRACCESSDRIVERNOP_H
|
||||
#ifndef __VIR_ACCESS_DRIVER_NOP_H__
|
||||
# define __VIR_ACCESS_DRIVER_NOP_H__
|
||||
|
||||
# include "access/viraccessdriver.h"
|
||||
|
||||
extern virAccessDriver accessDriverNop;
|
||||
|
||||
#endif /* LIBVIRT_VIRACCESSDRIVERNOP_H */
|
||||
#endif /* __VIR_ACCESS_DRIVER_NOP_H__ */
|
||||
|
||||
@@ -18,11 +18,11 @@
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_VIRACCESSDRIVERPOLKIT_H
|
||||
# define LIBVIRT_VIRACCESSDRIVERPOLKIT_H
|
||||
#ifndef __VIR_ACCESS_DRIVER_POLKIT_H__
|
||||
# define __VIR_ACCESS_DRIVER_POLKIT_H__
|
||||
|
||||
# include "viraccessdriver.h"
|
||||
|
||||
extern virAccessDriver accessDriverPolkit;
|
||||
|
||||
#endif /* LIBVIRT_VIRACCESSDRIVERPOLKIT_H */
|
||||
#endif /* __VIR_ACCESS_DRIVER_POLKIT_H__ */
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_VIRACCESSDRIVERSTACK_H
|
||||
# define LIBVIRT_VIRACCESSDRIVERSTACK_H
|
||||
#ifndef __VIR_ACCESS_DRIVER_STACK_H__
|
||||
# define __VIR_ACCESS_DRIVER_STACK_H__
|
||||
|
||||
# include "access/viraccessdriver.h"
|
||||
|
||||
@@ -29,4 +29,4 @@ int virAccessDriverStackAppend(virAccessManagerPtr manager,
|
||||
|
||||
extern virAccessDriver accessDriverStack;
|
||||
|
||||
#endif /* LIBVIRT_VIRACCESSDRIVERSTACK_H */
|
||||
#endif /* __VIR_ACCESS_DRIVER_STACK_H__ */
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_VIRACCESSMANAGER_H
|
||||
# define LIBVIRT_VIRACCESSMANAGER_H
|
||||
#ifndef __VIR_ACCESS_MANAGER_H__
|
||||
# define __VIR_ACCESS_MANAGER_H__
|
||||
|
||||
# include "viridentity.h"
|
||||
# include "conf/domain_conf.h"
|
||||
@@ -93,4 +93,4 @@ int virAccessManagerCheckStorageVol(virAccessManagerPtr manager,
|
||||
virAccessPermStorageVol perm);
|
||||
|
||||
|
||||
#endif /* LIBVIRT_VIRACCESSMANAGER_H */
|
||||
#endif /* __VIR_ACCESS_MANAGER_H__ */
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_VIRACCESSPERM_H
|
||||
# define LIBVIRT_VIRACCESSPERM_H
|
||||
#ifndef __VIR_ACCESS_PERM_H__
|
||||
# define __VIR_ACCESS_PERM_H__
|
||||
|
||||
# include "internal.h"
|
||||
# include "virutil.h"
|
||||
@@ -417,7 +417,7 @@ typedef enum {
|
||||
|
||||
/**
|
||||
* @desc: Access node device
|
||||
* @message: Accessing node device requires authorization
|
||||
* @message: Accesing node device requires authorization
|
||||
* @anonymous: 1
|
||||
*/
|
||||
VIR_ACCESS_PERM_NODE_DEVICE_GETATTR,
|
||||
@@ -637,7 +637,7 @@ typedef enum {
|
||||
|
||||
/**
|
||||
* @desc: Access storage volume
|
||||
* @message: Accessing storage volume requires authorization
|
||||
* @message: Acceessing storage volume requires authorization
|
||||
* @anonymous: 1
|
||||
*/
|
||||
VIR_ACCESS_PERM_STORAGE_VOL_GETATTR,
|
||||
@@ -699,4 +699,4 @@ VIR_ENUM_DECL(virAccessPermSecret);
|
||||
VIR_ENUM_DECL(virAccessPermStoragePool);
|
||||
VIR_ENUM_DECL(virAccessPermStorageVol);
|
||||
|
||||
#endif /* LIBVIRT_VIRACCESSPERM_H */
|
||||
#endif /* __VIR_ACCESS_PERM_H__ */
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
* 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: Martin Kletzander <mkletzan@redhat.com>
|
||||
*/
|
||||
|
||||
%#include <libvirt/libvirt-admin.h>
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
* 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: Erik Skultety <eskultet@redhat.com>
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -16,6 +16,9 @@
|
||||
* 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: Erik Skultety <eskultet@redhat.com>
|
||||
* Martin Kletzander <mkletzan@redhat.com>
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -16,10 +16,13 @@
|
||||
* 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: Erik Skultety <eskultet@redhat.com>
|
||||
* Martin Kletzander <mkletzan@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_ADMIN_SERVER_H
|
||||
# define LIBVIRT_ADMIN_SERVER_H
|
||||
#ifndef __ADMIN_SERVER_H__
|
||||
# define __ADMIN_SERVER_H__
|
||||
|
||||
# include "rpc/virnetdaemon.h"
|
||||
# include "rpc/virnetserver.h"
|
||||
@@ -69,4 +72,4 @@ int adminServerSetClientLimits(virNetServerPtr srv,
|
||||
int nparams,
|
||||
unsigned int flags);
|
||||
|
||||
#endif /* LIBVIRT_ADMIN_SERVER_H */
|
||||
#endif /* __ADMIN_SERVER_H__ */
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
* 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: Martin Kletzander <mkletzan@redhat.com>
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
@@ -64,6 +66,28 @@ remoteAdmClientNew(virNetServerClientPtr client ATTRIBUTE_UNUSED,
|
||||
void *opaque)
|
||||
{
|
||||
struct daemonAdmClientPrivate *priv;
|
||||
uid_t clientuid;
|
||||
gid_t clientgid;
|
||||
pid_t clientpid;
|
||||
unsigned long long timestamp;
|
||||
|
||||
if (virNetServerClientGetUNIXIdentity(client,
|
||||
&clientuid,
|
||||
&clientgid,
|
||||
&clientpid,
|
||||
×tamp) < 0)
|
||||
return NULL;
|
||||
|
||||
VIR_DEBUG("New client pid %lld uid %lld",
|
||||
(long long)clientpid,
|
||||
(long long)clientuid);
|
||||
|
||||
if (geteuid() != clientuid) {
|
||||
virReportRestrictedError(_("Disallowing client %lld with uid %lld"),
|
||||
(long long)clientpid,
|
||||
(long long)clientuid);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (VIR_ALLOC(priv) < 0)
|
||||
return NULL;
|
||||
@@ -113,13 +137,11 @@ get_nonnull_server(virNetDaemonPtr dmn, admin_nonnull_server srv)
|
||||
return virNetDaemonGetServer(dmn, srv.name);
|
||||
}
|
||||
|
||||
static int ATTRIBUTE_RETURN_CHECK
|
||||
static void
|
||||
make_nonnull_server(admin_nonnull_server *srv_dst,
|
||||
virNetServerPtr srv_src)
|
||||
{
|
||||
if (VIR_STRDUP(srv_dst->name, virNetServerGetName(srv_src)) < 0)
|
||||
return -1;
|
||||
return 0;
|
||||
ignore_value(VIR_STRDUP_QUIET(srv_dst->name, virNetServerGetName(srv_src)));
|
||||
}
|
||||
|
||||
static virNetServerClientPtr
|
||||
@@ -128,14 +150,13 @@ get_nonnull_client(virNetServerPtr srv, admin_nonnull_client clnt)
|
||||
return virNetServerGetClient(srv, clnt.id);
|
||||
}
|
||||
|
||||
static int
|
||||
static void
|
||||
make_nonnull_client(admin_nonnull_client *clt_dst,
|
||||
virNetServerClientPtr clt_src)
|
||||
{
|
||||
clt_dst->id = virNetServerClientGetID(clt_src);
|
||||
clt_dst->timestamp = virNetServerClientGetTimestamp(clt_src);
|
||||
clt_dst->transport = virNetServerClientGetTransport(clt_src);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Functions */
|
||||
|
||||
@@ -16,10 +16,12 @@
|
||||
* 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: Martin Kletzander <mkletzan@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_ADMIN_SERVER_DISPATCH_H
|
||||
# define LIBVIRT_ADMIN_SERVER_DISPATCH_H
|
||||
#ifndef __ADMIN_SERVER_DISPATCH_H__
|
||||
# define __ADMIN_SERVER_DISPATCH_H__
|
||||
|
||||
# include "rpc/virnetserverprogram.h"
|
||||
# include "rpc/virnetserverclient.h"
|
||||
@@ -37,4 +39,4 @@ void *remoteAdmClientNewPostExecRestart(virNetServerClientPtr client,
|
||||
virJSONValuePtr remoteAdmClientPreExecRestart(virNetServerClientPtr client,
|
||||
void *data);
|
||||
|
||||
#endif /* LIBVIRT_ADMIN_SERVER_DISPATCH_H */
|
||||
#endif /* __ADMIN_SERVER_DISPATCH_H__ */
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_BHYVE_CAPABILITIES_H
|
||||
# define LIBVIRT_BHYVE_CAPABILITIES_H
|
||||
#ifndef _BHYVE_CAPABILITIES
|
||||
# define _BHYVE_CAPABILITIES
|
||||
|
||||
# include "capabilities.h"
|
||||
# include "conf/domain_capabilities.h"
|
||||
@@ -55,4 +55,4 @@ typedef enum {
|
||||
int virBhyveProbeGrubCaps(virBhyveGrubCapsFlags *caps);
|
||||
int virBhyveProbeCaps(unsigned int *caps);
|
||||
|
||||
#endif /* LIBVIRT_BHYVE_CAPABILITIES_H */
|
||||
#endif
|
||||
|
||||
@@ -924,7 +924,7 @@ virBhyveGetBootDisk(virDomainDefPtr def)
|
||||
}
|
||||
}
|
||||
|
||||
/* If user didn't explicitly specify boot priority,
|
||||
/* If user didn't explicily specify boot priority,
|
||||
* just return the first usable disk */
|
||||
if ((match == NULL) && (first_usable_disk_index >= 0))
|
||||
return def->disks[first_usable_disk_index];
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_BHYVE_COMMAND_H
|
||||
# define LIBVIRT_BHYVE_COMMAND_H
|
||||
#ifndef __BHYVE_COMMAND_H__
|
||||
# define __BHYVE_COMMAND_H__
|
||||
|
||||
# include "bhyve_domain.h"
|
||||
# include "bhyve_utils.h"
|
||||
@@ -42,4 +42,4 @@ virCommandPtr
|
||||
virBhyveProcessBuildLoadCmd(virConnectPtr conn, virDomainDefPtr def,
|
||||
const char *devmap_file, char **devicesmap_out);
|
||||
|
||||
#endif /* LIBVIRT_BHYVE_COMMAND_H */
|
||||
#endif /* __BHYVE_COMMAND_H__ */
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_BHYVE_CONF_H
|
||||
# define LIBVIRT_BHYVE_CONF_H
|
||||
#ifndef BHYVE_CONF_H
|
||||
# define BHYVE_CONF_H
|
||||
|
||||
# include "bhyve_utils.h"
|
||||
|
||||
@@ -29,4 +29,4 @@ virBhyveDriverConfigPtr virBhyveDriverGetConfig(bhyveConnPtr driver);
|
||||
int virBhyveLoadDriverConfig(virBhyveDriverConfigPtr cfg,
|
||||
const char *filename);
|
||||
|
||||
#endif /* LIBVIRT_BHYVE_CONF_H */
|
||||
#endif /* BHYVE_CONF_H */
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
* 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: Roman Bogorodskiy
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -16,10 +16,12 @@
|
||||
* 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: Roman Bogorodskiy
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_BHYVE_DEVICE_H
|
||||
# define LIBVIRT_BHYVE_DEVICE_H
|
||||
#ifndef __BHYVE_DEVICE_H__
|
||||
# define __BHYVE_DEVICE_H__
|
||||
|
||||
# include "domain_conf.h"
|
||||
# include "virpci.h"
|
||||
@@ -33,4 +35,4 @@ virDomainPCIAddressSetPtr bhyveDomainPCIAddressSetCreate(virDomainDefPtr def,
|
||||
int bhyveDomainAssignAddresses(virDomainDefPtr def, virDomainObjPtr obj)
|
||||
ATTRIBUTE_NONNULL(1);
|
||||
|
||||
#endif /* LIBVIRT_BHYVE_DEVICE_H */
|
||||
#endif /* __BHYVE_DEVICE_H__ */
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
* 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: Roman Bogorodskiy
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -16,10 +16,12 @@
|
||||
* 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: Roman Bogorodskiy
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_BHYVE_DOMAIN_H
|
||||
# define LIBVIRT_BHYVE_DOMAIN_H
|
||||
#ifndef __BHYVE_DOMAIN_H__
|
||||
# define __BHYVE_DOMAIN_H__
|
||||
|
||||
# include "domain_addr.h"
|
||||
# include "domain_conf.h"
|
||||
@@ -40,4 +42,4 @@ virDomainXMLOptionPtr virBhyveDriverCreateXMLConf(bhyveConnPtr);
|
||||
extern virDomainXMLPrivateDataCallbacks virBhyveDriverPrivateDataCallbacks;
|
||||
extern virDomainDefParserConfig virBhyveDriverDomainDefParserConfig;
|
||||
|
||||
#endif /* LIBVIRT_BHYVE_DOMAIN_H */
|
||||
#endif /* __BHYVE_DOMAIN_H__ */
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
* 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: Roman Bogorodskiy
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
@@ -733,14 +735,14 @@ bhyveConnectDomainXMLToNative(virConnectPtr conn,
|
||||
NULL)))
|
||||
goto cleanup;
|
||||
|
||||
virBufferAdd(&buf, virCommandToString(loadcmd, false), -1);
|
||||
virBufferAdd(&buf, virCommandToString(loadcmd), -1);
|
||||
virBufferAddChar(&buf, '\n');
|
||||
}
|
||||
|
||||
if (!(cmd = virBhyveProcessBuildBhyveCmd(conn, def, true)))
|
||||
goto cleanup;
|
||||
|
||||
virBufferAdd(&buf, virCommandToString(cmd, false), -1);
|
||||
virBufferAdd(&buf, virCommandToString(cmd), -1);
|
||||
|
||||
if (virBufferCheckError(&buf) < 0)
|
||||
goto cleanup;
|
||||
|
||||
@@ -16,10 +16,12 @@
|
||||
* 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: Roman Bogorodskiy <bogorodskiy@gmail.com>
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_BHYVE_DRIVER_H
|
||||
# define LIBVIRT_BHYVE_DRIVER_H
|
||||
#ifndef __BHYVE_DRIVER_H__
|
||||
# define __BHYVE_DRIVER_H__
|
||||
|
||||
# include "capabilities.h"
|
||||
# include "bhyve_utils.h"
|
||||
@@ -32,4 +34,4 @@ unsigned bhyveDriverGetGrubCaps(virConnectPtr conn);
|
||||
|
||||
virCapsPtr bhyveDriverGetCapabilities(bhyveConnPtr driver);
|
||||
|
||||
#endif /* LIBVIRT_BHYVE_DRIVER_H */
|
||||
#endif /* __BHYVE_DRIVER_H__ */
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
* 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: Conrad Meyer <cse.cem@gmail.com>
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -16,10 +16,12 @@
|
||||
* 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: Conrad Meyer <cse.cem@gmail.com>
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_BHYVE_MONITOR_H
|
||||
# define LIBVIRT_BHYVE_MONITOR_H
|
||||
#ifndef BHYVE_MONITOR_H
|
||||
# define BHYVE_MONITOR_H
|
||||
|
||||
# include "internal.h"
|
||||
# include "domain_conf.h"
|
||||
@@ -31,4 +33,4 @@ typedef bhyveMonitor *bhyveMonitorPtr;
|
||||
bhyveMonitorPtr bhyveMonitorOpen(virDomainObjPtr vm, bhyveConnPtr driver);
|
||||
void bhyveMonitorClose(bhyveMonitorPtr mon);
|
||||
|
||||
#endif /* LIBVIRT_BHYVE_MONITOR_H */
|
||||
#endif /* BHYVE_MONITOR_H */
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
* 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: Fabian Freyer <fabian.freyer@physik.tu-berlin.de>
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -16,13 +16,15 @@
|
||||
* 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: Fabian Freyer <fabian.freyer@physik.tu-berlin.de>
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_BHYVE_PARSE_COMMAND_H
|
||||
# define LIBVIRT_BHYVE_PARSE_COMMAND_H
|
||||
#ifndef __BHYVE_PARSE_COMMAND_H__
|
||||
# define __BHYVE_PARSE_COMMAND_H__
|
||||
|
||||
virDomainDefPtr bhyveParseCommandLineString(const char* nativeConfig,
|
||||
unsigned caps,
|
||||
virDomainXMLOptionPtr xmlopt);
|
||||
|
||||
#endif /* LIBVIRT_BHYVE_PARSE_COMMAND_H */
|
||||
#endif /* __BHYVE_PARSE_COMMAND_H__*/
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_BHYVE_PROCESS_H
|
||||
# define LIBVIRT_BHYVE_PROCESS_H
|
||||
#ifndef __BHYVE_PROCESS_H__
|
||||
# define __BHYVE_PROCESS_H__
|
||||
|
||||
# include "bhyve_utils.h"
|
||||
|
||||
@@ -45,4 +45,4 @@ typedef enum {
|
||||
VIR_BHYVE_PROCESS_START_AUTODESTROY = 1 << 0,
|
||||
} bhyveProcessStartFlags;
|
||||
|
||||
#endif /* LIBVIRT_BHYVE_PROCESS_H */
|
||||
#endif /* __BHYVE_PROCESS_H__ */
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user