- 21 5月, 2011 1 次提交
-
-
由 Matthias Bolte 提交于
-
- 20 5月, 2011 1 次提交
-
-
由 Richard W.M. Jones 提交于
-
- 18 5月, 2011 1 次提交
-
-
由 Hu Tao 提交于
support for virDomainSetSchedulerParametersFlags of remote driver.
-
- 17 5月, 2011 3 次提交
-
-
由 Matthias Bolte 提交于
virStreamNew needs to dispatch the error that virGetStream reports on failure. remoteCreateClientStream can fail due to virStreamNew or due to VIR_ALLOC. Report OOM error for VIR_ALLOC failure to report errors in all error cases. Remove OOM error reporting from remoteCreateClientStream callers.
-
由 Daniel P. Berrange 提交于
* daemon/remote.c: Free mime string
-
由 Daniel P. Berrange 提交于
* daemon/remote.c: Update screenshot dispatcher to follow standard practice
-
- 16 5月, 2011 2 次提交
-
-
由 Daniel P. Berrange 提交于
* src/remote/remote_protocol.x: Define wire protocol for migration protocol v3 * daemon/remote.c: Server side dispatch * src/remote/remote_driver.c: Client side serialization * src/remote/remote_protocol.c, src/remote/remote_protocol.h, daemon/remote_dispatch_args.h, daemon/remote_dispatch_prototypes.h, daemon/remote_dispatch_ret.h, daemon/remote_dispatch_table.h: Re-generate files * src/remote_protocol-structs: Declare new ABIs
-
由 Jiri Denemark 提交于
-
- 13 5月, 2011 1 次提交
-
-
由 Michal Privoznik 提交于
* src/remote/remote_protocol.x: Wire protocol definition * daemon/remote.c: Daemon part * src/remote/remote_driver.c: Client part * src/remote_protocol-structs: Add structures
-
- 12 5月, 2011 2 次提交
-
-
由 Eric Blake 提交于
We were 31/73 on whether to translate; since less than 50% translated and since VIR_INFO is less than VIR_WARN which also doesn't translate, this makes sense. * cfg.mk (sc_prohibit_gettext_markup): Add VIR_INFO, since it falls between WARN and DEBUG. * daemon/libvirtd.c (qemudDispatchSignalEvent, remoteCheckAccess) (qemudDispatchServer): Adjust offenders. * daemon/remote.c (remoteDispatchAuthPolkit): Likewise. * src/network/bridge_driver.c (networkReloadIptablesRules) (networkStartNetworkDaemon, networkShutdownNetworkDaemon) (networkCreate, networkDefine, networkUndefine): Likewise. * src/qemu/qemu_driver.c (qemudDomainDefine) (qemudDomainUndefine): Likewise. * src/storage/storage_driver.c (storagePoolCreate) (storagePoolDefine, storagePoolUndefine, storagePoolStart) (storagePoolDestroy, storagePoolDelete, storageVolumeCreateXML) (storageVolumeCreateXMLFrom, storageVolumeDelete): Likewise. * src/util/bridge.c (brProbeVnetHdr): Likewise. * po/POTFILES.in: Drop src/util/bridge.c.
-
由 Lai Jiangshan 提交于
These VIR_XXXX0 APIs make us confused, use the non-0-suffix APIs instead. How do these coversions works? The magic is using the gcc extension of ##. When __VA_ARGS__ is empty, "##" will swallow the "," in "fmt," to avoid compile error. example: origin after CPP high_level_api("%d", a_int) low_level_api("%d", a_int) high_level_api("a string") low_level_api("a string") About 400 conversions. 8 special conversions: VIR_XXXX0("") -> VIR_XXXX("msg") (avoid empty format) 2 conversions VIR_XXXX0(string_literal_with_%) -> VIR_XXXX(%->%%) 0 conversions VIR_XXXX0(non_string_literal) -> VIR_XXXX("%s", non_string_literal) (for security) 6 conversions Signed-off-by: NLai Jiangshan <laijs@cn.fujitsu.com>
-
- 07 5月, 2011 11 次提交
-
-
由 Eric Blake 提交于
In preparation for removing generated files, it is necessary to tell automake that the generated files must be distributed but not directly compiled (since they are included into the body of a larger .c file that is compiled). Hence, even though these files are code and not headers in the strict sense of the word, it is easier to rename them to .h for automake's sake. * daemon/remote_client_bodies.c: Rename to .h. * daemon/qemu_client_bodies.c: Likewise. * src/remote/remote_client_bodies.c: Likewise. * src/remote/qemu_client_bodies.c: Likewise. * daemon/Makefile.am (remote_dispatch_bodies.c) (qemu_dispatch_bodies.c): Rename to .h. (remote.c, EXTRA_DIST): Reflect rename. * daemon/remote.c: Likewise. * daemon/remote_generator.pl: Likewise. * src/Makefile.am (remote/remote_driver.c): Likewise. * src/remote/remote_driver.c: Likewise. * po/POTFILES.in: Likewise. * cfg.mk (exclude_file_name_regexp--sc_require_config_h) (exclude_file_name_regexp--sc_require_config_h_first) (exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF): Likewise.
-
由 Matthias Bolte 提交于
Once again rename members in the XDR definitions to avoid special case code in the generator.
-
由 Matthias Bolte 提交于
They require additional special cases.
-
由 Matthias Bolte 提交于
-
由 Matthias Bolte 提交于
Avoids special case handling in the remote generator.
-
由 Matthias Bolte 提交于
-
由 Matthias Bolte 提交于
This covers functions that return single wrapped objects and don't involve complexer code in the body.
-
由 Matthias Bolte 提交于
-
由 Matthias Bolte 提交于
Again this will simplify the generator, due to less special case handling.
-
由 Matthias Bolte 提交于
This simplifies the remote protocol code generator. Also rename 'ret' to 'result' to resolve a naming conflict in the generator.
-
由 Matthias Bolte 提交于
This patch just covers the simple functions without explicit return values. There is more to be handled. The generator collects the members of the XDR argument structs and uses this information to generate the function bodies. Exclude the generated files from offending syntax-checks. Suggested by Richard W.M. Jones
-
- 05 5月, 2011 1 次提交
-
-
由 Eric Blake 提交于
Clang found three instances of uninitialized use of nparams in the cleanup path. Unfortunately, one is a false positive: clang couldn't see that ret->params.params_val is guaranteed to be NULL unless allocated within a function, and that nparams is guaranteed to be assigned prior to the allocation; hoisting the assignment to nparams to be earlier in the function shuts up that false positive. But two of the reports also happened to highlight a real bug - the error path can dereference NULL. Regression introduced in commit 158ba873. * daemon/remote.c (remoteDispatchDomainGetMemoryParameters) (remoteDispatchDomainGetBlkioParameters): Don't clear fields if array was not allocated. (remoteDispatchDomainGetSchedulerParameters): Initialize nparams earlier.
-
- 27 4月, 2011 1 次提交
-
-
由 Hu Tao 提交于
virsh schedinfo inactive-domain will trigger the problem.
-
- 23 4月, 2011 1 次提交
-
-
由 Matthias Bolte 提交于
-
- 18 4月, 2011 5 次提交
-
-
由 Daniel P. Berrange 提交于
Replace some occurrances of virDomainPtr domain; virNetworkPtr network; With virDomainPtr dom; virNetworkPtr net; * daemon/remote.c: Fix variable naming to follow standard
-
由 Daniel P. Berrange 提交于
Replace cases of type = virConnectGetType(conn); if (type == NULL) goto cleanup; With if (!(type = virConnectGetType(conn))) goto cleanup; * daemon/remote.c: Write error checks in compat form
-
由 Daniel P. Berrange 提交于
Replace all occurrances of if (....) { goto cleanup; } With if (.....) goto cleanup; to save one line of code * daemon/remote.c: Remove curly braces on single line conditionals
-
由 Daniel P. Berrange 提交于
The libvirt APIs reserve any negative value for indicating an error. Thus checks if (virXXXX() == -1) Should instead be if (virXXXX() < 0) * daemon/remote.c: s/ == -1/ < 0/
-
由 Daniel P. Berrange 提交于
The dispatcher functions have numerous places where they return to the caller. This leads to duplicated cleanup code, often resulting in memory leaks. It makes it harder to ensure that errors are dispatched before freeing objects, which may overwrite the original error. The standard pattern is now remoteDispatchXXX(...) { int rv = -1; .... if (XXX < 0) goto cleanup; ... if (XXXX < 0) goto cleanup; ... rv = 0; cleanup: if (rv < 0) remoteDispatchError(rerr); ...free all other stuff.. return rv; } * daemon/remote.c: Centralize all cleanup paths * daemon/stream.c: s/remoteDispatchConnError/remoteDispatchError/ * daemon/dispatch.c, daemon/dispatch.h: Replace remoteDispatchConnError with remoteDispatchError removing unused virConnectPtr
-
- 14 4月, 2011 4 次提交
-
-
由 Daniel P. Berrange 提交于
The daemon dispatcher code had an obsolete macro #define REMOTE_DEBUG(fmt, ...) VIR_DEBUG(fmt, __VA_ARGS__) This can be trivially removed * daemon/remote.c: s/REMOTE_DEBUG/VIR_DEBUG/
-
由 Daniel P. Berrange 提交于
Many functions did not check for whether a connection was open. Replace the macro which obscures control flow, with explicit checks, and ensure all dispatcher code has checks. * daemon/remote.c: Add connection checks
-
由 Daniel P. Berrange 提交于
Some dispatcher methods have a parameter remote_error *err, Instead of the more normal remote_error *rerr, * daemon/remote.c: s/err/rerr/
-
由 Daniel P. Berrange 提交于
A lot of code in libvirtd's dispatcher used the style dom = get_nonnull_domain (conn, args->dom); Instead of the normal libvirt style dom = get_nonnull_domain(conn, args->dom); * daemon/remote.c: Remove all whitelist before function brackets
-
- 05 4月, 2011 1 次提交
-
-
由 Matthias Bolte 提交于
-
- 29 3月, 2011 1 次提交
-
-
由 Daniel P. Berrange 提交于
* daemon/remote.c, src/remote/remote_driver.c: Implementation of storage vol upload/download APIs * src/remote/remote_protocol.x: Wire protocol definition for upload/download * daemon/remote_dispatch_args.h, daemon/remote_dispatch_prototypes.h, daemon/remote_dispatch_table.h, src/remote/remote_protocol.h, src/remote/remote_protocol.c: Re-generate
-
- 25 3月, 2011 2 次提交
-
-
由 Jiri Denemark 提交于
Commit f44bfb7f was supposed to make sure no additional libvirt API (esp. *Free) is called before remoteDispatchConnError() is called on error. However, the patch missed two instances.
-
由 Eric Blake 提交于
Child processes don't always reach _exit(); if they die from a signal, then any messages should still be accurate. Most users either expect a 0 status (thankfully, if status==0, then WIFEXITED(status) is true and WEXITSTATUS(status)==0 for all known platforms) or were filtering on WIFEXITED before printing a status, but a few were missing this check. Additionally, nwfilter_ebiptables_driver was making an assumption that works on Linux (where WEXITSTATUS shifts and WTERMSIG just masks) but fails on other platforms (where WEXITSTATUS just masks and WTERMSIG shifts). * src/util/command.h (virCommandTranslateStatus): New helper. * src/libvirt_private.syms (command.h): Export it. * src/util/command.c (virCommandTranslateStatus): New function. (virCommandWait): Use it to also diagnose status from signals. * src/security/security_apparmor.c (load_profile): Likewise. * src/storage/storage_backend.c (virStorageBackendQEMUImgBackingFormat): Likewise. * src/util/util.c (virExecDaemonize, virRunWithHook) (virFileOperation, virDirCreate): Likewise. * daemon/remote.c (remoteDispatchAuthPolkit): Likewise. * src/nwfilter/nwfilter_ebiptables_driver.c (ebiptablesExecCLI): Likewise.
-
- 24 3月, 2011 1 次提交
-
-
由 Jiri Denemark 提交于
Bug https://bugzilla.redhat.com/show_bug.cgi?id=689374 reported libvirtd crash during error dispatch. The reason is that libvirtd uses remoteDispatchConnError() with non-NULL conn parameter which means that virConnGetLastError() is used instead of its thread safe replacement virGetLastError(). So when several libvirtd threads are reporting errors at the same time, the errors can get mixed or corrupted or in case of bad luck libvirtd itself crashes. Since Daniel B. is going to rewrite this code from scratch on top of his RPC infrastructure, I tried to come up with a minimal fix. Thus, remoteDispatchConnError() now just ignores its conn argument and always calls virGetLastError(). However, several callers had to be touched as well, since no libvirt API is allowed to be called before dispatching the error. Doing so would reset the error and we would have nothing to dispatch. As a result of that, the code is not very nice but that doesn't really make daemon/remote.c worse than it is now :-) And it will all die soon, which is good. The bug report also contains a reproducer in C which detects both mixed up error messages and libvirtd crash. Before this patch, I was able to crash libvirtd in about 20 seconds up to 3 minutes depending on number of CPU cores (more is better) and luck.
-
- 22 3月, 2011 1 次提交
-
-
由 Daniel P. Berrange 提交于
* src/remote/remote_protocol.x: Define wire protocol * daemon/remote.c, src/remote/remote_driver.c: Add new functions for virDomainMigrateSetSpeed API * src/remote/remote_protocol.c, src/remote/remote_protocol.h, daemon/remote_dispatch_args.h, daemon/remote_dispatch_prototypes.h, daemon/remote_dispatch_table.h: Re-generate files
-