- 23 2月, 2008 1 次提交
-
-
由 Jim Meyering 提交于
Avoid warnings like this: file:nnn:format not a string literal and no format arguments * qemud/qemud.c: Insert a "%s" format argument. * qemud/remote.c: Likewise. * src/iptables.c: Likewise. * src/qemu_driver.c: Likewise. * src/storage_backend.c: Likewise. * src/storage_backend_fs.c: Likewise. * src/storage_backend_iscsi.c Likewise. * src/storage_backend_logical.c: Likewise. * src/storage_conf.c: Likewise. * src/storage_driver.c: Likewise.
-
- 22 2月, 2008 5 次提交
-
-
由 Jim Meyering 提交于
Also add "make syntax-check" rules to ensure no new uses sneak in. There are many uses of write like this: if (write (fd, xml, towrite) != towrite) return -1; The problem is that the syscall can succeed, yet write less than the requested number of bytes, so the caller should retry rather than simply failing. This patch changes most of them to use util.c's safewrite wrapper, which encapsulates the process. Also, there were a few cases in which the retry loop was open-coded, and I replaced those, too. * Makefile.maint (sc_avoid_write): New rule, to avoid recurrence. * .x-sc_avoid_write: New file. Record two legitimate exemptions. * qemud/qemud.c (sig_handler, qemudClientWriteBuf): Use safewrite, not write. * src/conf.c (__virConfWriteFile): Likewise. * src/qemu_conf.c (qemudSaveConfig, qemudSaveNetworkConfig): Likewise. * src/qemu_driver.c (qemudWaitForMonitor, qemudStartVMDaemon) (qemudVMData, PROC_IP_FORWARD): Likewise. * proxy/libvirt_proxy.c: Include "util.h". (proxyWriteClientSocket): Use safewrite. * src/test.c (testDomainSave, testDomainCoreDump): Likewise. * src/proxy_internal.c (virProxyWriteClientSocket): Likewise. * src/virsh.c: Include "util-lib.h". (vshOutputLogFile): Use safewrite. * src/console.c: Include "util-lib.h". (vshRunConsole): Use safewrite.
-
由 Jim Meyering 提交于
We currently use safewrite from inside libvirt and don't want to publish any such function name. However, we do want to use it in applications like virsh, libvirtd and libvirt_proxy that link with libvirt. To that end, this change moves that function definition (along with the nearly identical saferead) into a new file, util-lib.c. To avoid maintaining separate copies of even such small functions, we simply include that new file from util.c. Then, the separate applications that need to use safewrite simply compile and link with util-lib.c. Of course, this does mean that each of those applications will containing two copies of these functions. However, the functions are so small that it's not worth worrying about that. * src/util.c (saferead, safewrite): Move function definitions to util-lib.c and include that .c file. * src/util-lib.c (saferead, safewrite): New file. Functions from src/util.c with slight change (s/int r =/ssize_t r =/) to reflect read/write return type. * src/util-lib.h: Declare the two moved functions. * src/util.h: Remove declarations. Include src/util-lib.h. * proxy/Makefile.am (libvirt_proxy_SOURCES): Add src/util-lib.c. * qemud/Makefile.am (libvirtd_SOURCES): Likewise. * src/Makefile.am (virsh_SOURCES): Add util-lib.c. Remove some SP-before-TAB.
-
由 Jim Meyering 提交于
* src/iptables.c (iptRulesSave) [!ENABLE_IPTABLES_LOKKIT]: Mark parameter as used.
-
由 Jim Meyering 提交于
* src/openvz_conf.c (openvzSetUUID): Rewrite to avoid unchecked lseek, write, and close as well as a potential file descriptor leak.
-
由 Jim Meyering 提交于
* src/openvz_conf.c (openvzLocateConfDir, openvzGetVPSUUID): (openvzSetUUID): Don't dereference NULL upon failure.
-
- 21 2月, 2008 3 次提交
-
-
由 Richard W.M. Jones 提交于
* src/openvz_conf.c: Double-free fix (Anton Protopopov).
-
由 Daniel P. Berrange 提交于
-
由 Daniel P. Berrange 提交于
-
- 20 2月, 2008 14 次提交
-
-
由 Daniel P. Berrange 提交于
-
由 Daniel P. Berrange 提交于
-
由 Daniel P. Berrange 提交于
-
由 Daniel P. Berrange 提交于
-
由 Daniel P. Berrange 提交于
-
由 Daniel P. Berrange 提交于
-
由 Daniel P. Berrange 提交于
-
由 Daniel P. Berrange 提交于
-
由 Daniel P. Berrange 提交于
-
由 Daniel P. Berrange 提交于
-
由 Daniel P. Berrange 提交于
-
由 Daniel P. Berrange 提交于
-
由 Daniel P. Berrange 提交于
-
由 Daniel P. Berrange 提交于
-
- 08 2月, 2008 4 次提交
-
-
由 Mark McLoughlin 提交于
* src/internal.h: move xstrol() variants from here ... * src/util.[ch]: ... to here and rename to virStrToLong() * src/libvirt_sym.version: export __virStrToLong_i() for virsh and qemud. * src/nodeinfo.c, src/stats_linux.c, src/virsh.c, src/xend_internal.c, qemud/qemud.c: replace xstrtol() calls with virStrToLong() * src/nodeinfo.h: don't include internal.h, which was only needed for xstrtol(), but instead include libvirt.h which is suffificient for the declarations in the header.
-
由 Daniel Veillard 提交于
* src/hash.c: fix a couple of problems in virHashRemoveSet based on Hiroyuki Kaguchi patch and explanations. Daniel
-
由 Jim Meyering 提交于
* po/POTFILES.in: Add names of many new files. * Makefile.maint (err_func_re): Add qemudLog. Mark diagnostics with _(...). Split some long lines. * qemud/qemud.c (remoteCheckCertFile, remoteInitializeGnuTLS): (qemudDispatchSignalEvent, qemudSetCloseExec, qemudSetNonBlock): (qemudWritePidFile, qemudListenUnix, remoteMakeSockets): (remoteListenTCP, qemudInitPaths, qemudInitialize): (qemudNetworkInit, remoteInitializeTLSSession, remoteCheckDN): (remoteCheckCertificate, remoteCheckAccess, qemudDispatchServer): (qemudClientReadBuf, qemudDispatchClientRead): (qemudClientWriteBuf, qemudDispatchClientWrite, qemudOneLoop): (remoteConfigGetStringList, checkType, GET_CONF_STR): (remoteConfigGetAuth, remoteReadConfigFile, main): * qemud/remote.c (remoteDispatchAuthSaslInit, remoteSASLCheckSSF): (remoteSASLCheckAccess, remoteDispatchAuthSaslStart): (remoteDispatchAuthSaslStep, remoteDispatchAuthSaslInit): (remoteDispatchAuthSaslStart, remoteDispatchAuthSaslStep): (qemudGetSocketIdentity, remoteDispatchAuthPolkit): * src/iptables.c (notifyRulesUpdated, MAX_FILE_LEN, iptRulesSave): (iptRulesReload): * src/qemu_conf.c (qemudExtractVersionInfo, qemudLoadConfig): (qemudLoadNetworkConfig, qemudScanConfigDir): * src/qemu_driver.c (qemudSetCloseExec, qemudSetNonBlock): (qemudAutostartConfigs, qemudStartup, qemudReload): (qemudWaitForMonitor, qemudStartVMDaemon, qemudVMData): (qemudShutdownVMDaemon, qemudStartNetworkDaemon): (qemudShutdownNetworkDaemon, qemudMonitorCommand): (qemudDomainUndefine, qemudNetworkUndefine): * src/uuid.c (virUUIDGenerate): * src/xm_internal.c (xenXMAttachInterface):
-
由 Jim Meyering 提交于
* build-aux/useless-if-before-free: Rename from ... * build-aux/find-unnecessary-if-before-free: ... this. Remove file. Also changed it so that new names are no longer hard-coded in the script. Instead, they're supplied via options: * Makefile.cfg (useless_free_options): Define. Add xmlXPathFreeObject to the list of free-like functions it detects. * Makefile.maint (sc_avoid_if_before_free): Reflect script renaming. * .x-sc_avoid_if_before_free: Likewise. * src/openvz_conf.c (openvzParseXML): Remove useless "if"-before-free. * src/qemu_conf.c (qemudParseXML, qemudParseNetworkXML): Likewise. * src/virsh.c (cmdVNCDisplay, cmdTTYConsole, cmdDetachInterface): (cmdDetachDisk): Likewise. * src/xm_internal.c (xenXMConfigSetIntFromXPath): Likewise. (xenXMConfigSetStringFromXPath, xenXMParseXMLToConfig): Likewise. (xenXMDomainAttachDevice, xenXMAttachDisk, xenXMAttachInterface): (xenXMDomainDetachDevice): Likewise. * src/xml.c (virXPathString): Likewise. * tests/xmlrpctest.c (checkRequestValue): Likewise.
-
- 07 2月, 2008 7 次提交
-
-
由 Jim Meyering 提交于
-
由 Mark McLoughlin 提交于
-
由 Mark McLoughlin 提交于
-
由 Mark McLoughlin 提交于
-
由 Daniel Veillard 提交于
by Marcus Meissner Daniel
-
由 Daniel Veillard 提交于
* src/xm_internal.[ch]: applied patch from Shigeki Sakamoto to add/change/delete a Disk/NIC of an inactive domains Daniel
-
由 Daniel Veillard 提交于
* src/qemu_conf.c: applied 2 patches from Guido Guenther to avoid crashes when reading the config file Daniel
-
- 06 2月, 2008 3 次提交
-
-
由 Jim Meyering 提交于
* src/xml.c (virDomainParseXMLOSDescHVM): Mark a diagnostic.
-
由 Jim Meyering 提交于
* Makefile.cfg (local-checks-to-skip): Remove sc_trailing_blank. * .x-sc_trailing_blank: New file, to exempt the few binary files.
-
由 Daniel P. Berrange 提交于
-
- 05 2月, 2008 2 次提交
-
-
由 Jim Meyering 提交于
* Makefile.maint (sc_prohibit_virBufferAdd_with_string_literal): New rule. * src/buf.h (virBufferAddLit): Define. * src/conf.c (virConfSaveValue): Use virBufferAddLit, in place of virBufferAdd everywhere possible. (virConfSaveEntry): Likewise. * src/qemu_conf.c (qemudGenerateXML, qemudGenerateNetworkXML): Likewise. * src/qemu_driver.c (qemudGetFeatures, qemudGetCapabilities): Likewise. * src/test.c (testDomainDumpXML, testNetworkDumpXML): Likewise. * src/xen_internal.c (xenHypervisorMakeCapabilitiesXML): Likewise. * src/xend_internal.c (xend_parse_sexp_desc_os): Likewise. (xend_parse_sexp_desc, sexpr_to_xend_topology_xml): Likewise. * src/xm_internal.c (xenXMDomainFormatXML, xenXMDomainPinVcpu): Likewise. * src/xml.c (virSaveCpuSet, virParseXenCpuTopology): Likewise. (virDomainParseXMLGraphicsDescImage): Likewise. (virDomainParseXMLGraphicsDescVFB, virDomainParseXMLOSDescHVM): Likewise. (virDomainParseXMLOSDescPV, virDomainParseXMLDiskDesc): Likewise. (virDomainParseXMLIfDesc, virDomainParseXMLDesc): Likewise.
-
由 Jim Meyering 提交于
* Makefile.maint (sc_unmarked_diagnostics): Check for more functions. * src/conf.c (virConfParseValue): Remove trailing space in diagnostic. * src/libvirt.c (do_open, virDomainMigrate): Mark diagnostics. * src/xend_internal.c (do_connect, xenDaemonDomainDumpXMLByID): Likewise. (xenDaemonDomainDumpXMLByName, xenDaemonCreateLinux): Likewise. (xenDaemonDomainMigratePerform, xenDaemonDomainDefineXML): Likewise. * src/xml.c (virXPathString, virXPathNumber, virXPathLong): Likewise. (virXPathBoolean, virXPathNode, virXPathNodeSet): Likewise. (virDomainParseXMLOSDescHVM): Likewise. * src/xmlrpc.c (xmlRpcValueNew): Likewise. (xmlRpcValueUnmarshalDictElement): Likewise.
-
- 04 2月, 2008 1 次提交
-
-
由 Jim Meyering 提交于
* src/virsh.c: Add a "%s" and wrap with _(...).
-