- 21 8月, 2019 3 次提交
-
-
由 Ján Tomko 提交于
A function to automatically format the xmlns:<prefix>='<uri>' attribute for per-driver namespaces. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Ján Tomko 提交于
We have hardcoded the namespace prefix in various places: 1) the xmlns string stored in the 'href' function 2) the xmlXPathRegisterNs call in each parser 3) all the parsing and formatting code actually dealing with these elements While eliminating the third one is probably a job for an actual XML-aware formatter, let's store the prefix separately here in the virXMLNamespace structure so that future patches can get rid of the first two bullets. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Ján Tomko 提交于
For various XMLs, we allow a custom namespace for passing unsupported configurations. Introduce a single structure to hold all the driver-specific functions to remove duplication. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
- 19 6月, 2019 1 次提交
-
-
由 Jonathon Jongsma 提交于
Signed-off-by: NJonathon Jongsma <jjongsma@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com> Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
- 10 4月, 2019 1 次提交
-
-
由 Peter Krempa 提交于
Keeping them with viralloc.h forcibly pulls in the other stuff from viralloc.h into other header files. This in turn creates a mess as more and more headers pull in the 'viral' header file. If we want to make 'viralloc.h' omnipresent we should pick a different approach. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 20 3月, 2019 1 次提交
-
-
由 Peter Krempa 提交于
We can use our VIR_AUTOPTR machinery also for libxml2's xmlDoc and xmlXPathContext. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 06 3月, 2019 1 次提交
-
-
由 Peter Krempa 提交于
The function does not transfer errors from 'attrBuf' and 'childBuf' arguments into 'buf', but rather reports them right away, thus we need to make sure that it's always checked. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 04 3月, 2019 1 次提交
-
-
由 Peter Krempa 提交于
Quite a few parts modify the XPath context current node to shift the scope and allow easier queries. This also means that the node needs to be restored afterwards. Introduce a macro based on 'VIR_AUTOCLEAN' which adds a local structure on the stack remembering the original node along with a function which will make sure that the node is reset when the local structure leaves scope. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 03 1月, 2019 1 次提交
-
-
由 Michal Privoznik 提交于
In 60046283 we've tried to remove Author(s): lines from comments at the beginning of our source files. Well, in some files while we removed the "Author" line we did not remove the actual list of authors. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
- 14 12月, 2018 2 次提交
-
-
由 Daniel P. Berrangé 提交于
Require that all headers are guarded by a symbol named LIBVIRT_$FILENAME where $FILENAME is the uppercased filename, with all characters outside a-z changed into '_'. Note we do not use a leading __ because that is technically a namespace reserved for the toolchain. Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
This introduces a syntax-check script that validates header files use a common layout: /* ...copyright header... */ <one blank line> #ifndef SYMBOL # define SYMBOL ....content.... #endif /* SYMBOL */ For any file ending priv.h, before the #ifndef, we will require a guard to prevent bogus imports: #ifndef SYMBOL_ALLOW # error .... #endif /* SYMBOL_ALLOW */ <one blank line> The many mistakes this script identifies are then fixed. Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 03 11月, 2017 1 次提交
-
-
由 Andrea Bolognani 提交于
Right-aligning backslashes when defining macros or using complex commands in Makefiles looks cute, but as soon as any changes is required to the code you end up with either distractingly broken alignment or unnecessarily big diffs where most of the changes are just pushing all backslashes a few characters to one side. Generated using $ git grep -El '[[:blank:]][[:blank:]]\\$' | \ grep -E '*\.([chx]|am|mk)$$' | \ while read f; do \ sed -Ei 's/[[:blank:]]*[[:blank:]]\\$/ \\/g' "$f"; \ done Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
-
- 28 8月, 2017 1 次提交
-
-
由 Pavel Hrdina 提交于
This helper allows you to better structurize the code if some element may or may not contains attributes and/or child elements. Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
- 17 8月, 2017 2 次提交
-
-
由 Pavel Hrdina 提交于
It's equivalent of calling virXPathString("string(.)", ctxt) but it doesn't have to use the XPath resolving and parsing. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
The virXMLPropStringLimit is an equivalent of virXPathStringLimit which should be preferred if you already have a XML dom node or if you need to parse more than one property. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
- 14 8月, 2017 1 次提交
-
-
由 Pavel Hrdina 提交于
Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
- 20 10月, 2016 1 次提交
-
-
由 Sławek Kapłoński 提交于
This new function can be used to check if e.g. name of XML node don't contains forbidden chars like "/" or "\n". Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 02 7月, 2016 1 次提交
-
-
由 Laine Stump 提交于
This is a generic version of virDomainDefMetadataSanitize() - the same functionality is now needed for network metadata.
-
- 08 6月, 2016 4 次提交
-
-
由 Ján Tomko 提交于
Split out the code for XML validation into a new function.
-
由 Ján Tomko 提交于
Split out all the code initializing the validator to a separate function.
-
由 Ján Tomko 提交于
Split out the code cleaning up the validator.
-
由 Ján Tomko 提交于
Store all the data related to RNG validation in one structure to allow splitting virXMLValidateAgainstSchema.
-
- 15 1月, 2015 1 次提交
-
-
由 Daniel P. Berrange 提交于
Add a helper method that can validate an XML document against an RNG schema
-
- 10 3月, 2014 1 次提交
-
-
由 Ján Tomko 提交于
Some of these are leftovers from renaming the files, others are just typos. Also introduce an ugly awk script to enforce this.
-
- 17 9月, 2013 3 次提交
-
-
由 Peter Krempa 提交于
The functionality wasn't originally implemented. This patch adds the ability to modify domain's XML metadata using the API.
-
由 Peter Krempa 提交于
The virDomainGetMetadata function was designed to support also retrieval of app specific metadata from the <metadata> element. This functionality was never implemented originally.
-
由 Peter Krempa 提交于
-
- 21 12月, 2012 1 次提交
-
-
由 Daniel P. Berrange 提交于
-
- 29 10月, 2012 1 次提交
-
-
由 Ján Tomko 提交于
In the XML warning, we print a virsh command line that can be used to edit that XML. This patch prints UUIDs if the entity name contains special characters (like shell metacharacters, or "--" that would break parsing of the XML comment). If the entity doesn't have a UUID, just print the virsh command that can be used to edit it.
-
- 08 12月, 2011 1 次提交
-
-
由 Eric Blake 提交于
On RHEL 5, with libxml2-2.6.26, the build failed with: virsh.c: In function 'vshNodeIsSuperset': virsh.c:11951: warning: implicit declaration of function 'xmlChildElementCount' (or if warnings aren't errors, a link failure later on). * src/util/xml.h (virXMLChildElementCount): New prototype. * src/util/xml.c (virXMLChildElementCount): New function. * src/libvirt_private.syms (xml.h): Export it. * tools/virsh.c (vshNodeIsSuperset): Use it.
-
- 28 10月, 2011 1 次提交
-
-
由 Jiri Denemark 提交于
Every time we write XML into a file we call virEmitXMLWarning to write a warning that the file is automatically generated. virXMLSaveFile simplifies this into a single step and makes rewriting existing XML file safe by using virFileRewrite internally.
-
- 19 8月, 2011 1 次提交
-
-
由 Eric Blake 提交于
Often, we want to use XPath functions on the just-parsed document; fold this into the parser function for convenience. * src/util/xml.h (virXMLParseHelper): Add argument. (virXMLParseStrHelper, virXMLParseFileHelper): Delete. (virXMLParseCtxt, virXMLParseStringCtxt, virXMLParseFileCtxt): New macros. * src/libvirt_private.syms (xml.h): Remove deleted functions. * src/util/xml.c (virXMLParseHelper): Add argument. (virXMLParseStrHelper, virXMLParseFileHelper): Delete.
-
- 14 1月, 2011 1 次提交
-
-
由 Eric Blake 提交于
It was awkward having only int conversion in the virStrToLong family, but only long conversion in the virXPath family. Make both families support both types. * src/util/util.h (virStrToLong_l, virStrToLong_ul): New prototypes. * src/util/xml.h (virXPathInt, virXPathUInt): Likewise. * src/util/util.c (virStrToLong_l, virStrToLong_ul): New functions. * src/util/xml.c (virXPathInt, virXPathUInt): Likewise. * src/libvirt_private.syms (util.h, xml.h): Export them.
-
- 23 3月, 2010 1 次提交
-
-
由 Jiri Denemark 提交于
-
- 10 3月, 2010 1 次提交
-
-
由 Eric Blake 提交于
* global: patch created by running: for f in $(git ls-files '*.[ch]') ; do cppi $f > $f.t && mv $f.t $f done
-
- 02 3月, 2010 1 次提交
-
-
由 Daniel P. Berrange 提交于
This introduces a third option for clock offset synchronization, that allows an arbitrary / variable adjustment to be set. In essence the XML contains the time delta in seconds, relative to UTC. <clock offset='variable' adjustment='123465'/> The difference from 'utc' mode, is that management apps should track adjustments and preserve them at next reboot. * docs/schemas/domain.rng: Schema for new clock mode * src/conf/domain_conf.c, src/conf/domain_conf.h: Parse new clock time delta * src/libvirt_private.syms, src/util/xml.c, src/util/xml.h: Add virXPathLongLong() method
-
- 09 2月, 2010 1 次提交
-
-
由 Matthias Bolte 提交于
It was used for error reporting only.
-
- 21 9月, 2009 1 次提交
-
-
由 Daniel P. Berrange 提交于
* src/bridge.c, src/bridge.h, src/buf.c, src/buf.h, src/cgroup.c, src/cgroup.h, src/conf.c, src/conf.h, src/event.c, src/event.h, src/hash.c, src/hash.h, src/hostusb.c, src/hostusb.h, src/iptables.c, src/iptables.h, src/logging.c, src/logging.h, src/memory.c, src/memory.h, src/pci.c, src/pci.h, src/qparams.c, src/qparams.h, src/stats_linux.c, src/stats_linux.h, src/threads-pthread.c, src/threads-pthread.h, src/threads-win32.c, src/threads-win32.h, src/threads.c, src/threads.h, src/util.c, src/util.h, src/uuid.c, src/uuid.h, src/virterror.c, src/virterror_internal.h, src/xml.c, src/xml.h: Move all files into src/util/ * daemon/Makefile.am: Add -Isrc/util/ to build flags * src/Makefile.am: Add -Isrc/util/ to build flags and update for moved files * src/libvirt_private.syms: Export cgroup APIs since they're now in util rather than linking directly to drivers * src/xen/xs_internal.c: Disable bogus virEventRemoveHandle call when built under PROXY * proxy/Makefile.am: Update for changed file locations. Remove bogus build of event.c * tools/Makefile.am, tests/Makefile.am: Add -Isrc/util/ to build flags
-
- 03 3月, 2009 1 次提交
-
-
由 Daniel P. Berrange 提交于
-
- 24 2月, 2009 1 次提交
-
-
由 Mark McLoughlin 提交于
Add a variant of virXPathULong() which can handle long longs. Needed for parsing storage device capacities.
-