- 25 6月, 2013 4 次提交
-
-
由 Laine Stump 提交于
virPCIDeviceReattach was making the assumption that the dev object given to it was one and the same with the dev object on the inactiveDevs list. If that had been the case, it would not need to free the dev object it removed from the inactive list, because the caller of virPCIDeviceReattach always frees the dev object that it passes in. Since the dev object passed in is *never* the same object that's on the list (it is a different object with the same name and attributes, created just for the purpose of searching for the actual object), simply doing a "ListSteal" to remove the object from the list results in one leaked object; we need to actually free the object after removing it from the list.
-
由 Laine Stump 提交于
* virPCIDeviceFindByIDs - find a device on a list w/o creating an object This makes searching for an existing device on a list lighter weight. * virPCIDeviceCopy - make a copy of an existing virPCIDevice object. * virPCIDeviceGetDriverPathAndName - construct new strings containing 1) the name of the driver bound to this device. 2) the full path to the sysfs config for that driver. (This code was lifted from virPCIDeviceUnbindFromStub, and replaced there with a call to this new function).
-
由 Laine Stump 提交于
Previously stubDriver was always set from a string literal, so it was okay to use a const char * that wasn't freed when the virPCIDevice was freed. This will not be the case in the near future, so it is now a char* that is allocated in virPCIDeviceSetStubDriver() and freed during virPCIDeviceFree().
-
由 Laine Stump 提交于
add it to the syntax-check list and fix the one offending caller.
-
- 24 6月, 2013 3 次提交
-
-
由 Daniel P. Berrange 提交于
When creating a virIdentityPtr for the system identity, include the current process ID as an attribute.
-
由 Daniel P. Berrange 提交于
This patch introduces the virAccessManagerPtr class as the interface between virtualization drivers and the access control drivers. The viraccessperm.h file defines the various permissions that will be used for each type of object libvirt manages Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 22 6月, 2013 1 次提交
-
- 21 6月, 2013 3 次提交
-
-
由 Ján Tomko 提交于
Detect qcow2 images with version 3 in the image header as VIR_STORAGE_FILE_QCOW2. These images have a feature bitfield, with just one feature supported so far: lazy_refcounts. The header length changed too, moving the location of the backing format name.
-
由 Roman Bogorodskiy 提交于
-
由 Roman Bogorodskiy 提交于
Implementation uses SIOCIFCREATE2 and SIOCIFDESTROY ioctls. Also, drop static virNetDevSetupControl() as we have public one avialable now.
-
- 19 6月, 2013 1 次提交
-
-
由 Ján Tomko 提交于
We don't care whether the trim was succesful or not anywhere except the tests. Switch it to void and set the buffer error on wrong usage.
-
- 17 6月, 2013 1 次提交
-
-
由 Doug Goldstein 提交于
In the first if case, virGetUserEnt() isn't necessary so don't bother calling it before determining we need it.
-
- 14 6月, 2013 4 次提交
-
-
由 Roman Bogorodskiy 提交于
Implementation uses SIOCIFCREATE2 and SIOCIFDESTROY ioctls.
-
由 Roman Bogorodskiy 提交于
This method is useful not only in virnetdev.c.
-
由 Roman Bogorodskiy 提交于
-
由 Ján Tomko 提交于
Call virLogVMessage instead of virLogMessage, since libudev called us with a va_list object, not a list of arguments. Honor message priority and strip the trailing newline. https://bugzilla.redhat.com/show_bug.cgi?id=969152
-
- 10 6月, 2013 2 次提交
-
-
由 Michal Privoznik 提交于
The IN6_IS_ADDR_UNSPECIFIED macro expects pointer to sin6_addr element instead of s6_addr element.
-
由 Martin Kletzander 提交于
-
- 08 6月, 2013 1 次提交
-
-
由 Richard Weinberger 提交于
virProcessGetNamespaces() opens files in /proc/XXX/ns/ which will later be passed to setns(). We have to make sure that the file descriptors in the array are in the correct order. In particular the 'user' namespace must be first otherwise setns() may fail for other namespaces. The order has been taken from util-linux's sys-utils/nsenter.c Also we must ignore EINVAL in setns() which occurs if the namespace associated with the fd, matches the calling process' current namespace. Signed-off-by: NRichard Weinberger <richard@nod.at> Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 07 6月, 2013 1 次提交
-
-
由 Michal Privoznik 提交于
This internal API checks, if passed address is a wildcard address.
-
- 06 6月, 2013 3 次提交
-
-
由 Ján Tomko 提交于
-
由 Ján Tomko 提交于
Found with 'git grep "= 1"'.
-
由 Eric Blake 提交于
Such as on FreeBSD. Broken in commit aa2a4cff. * src/util/virstoragefile.c (virStorageFileResize): Add missing ';', mark conditionally unused variables. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 05 6月, 2013 2 次提交
-
-
由 Eric Blake 提交于
Enforce the rule that .h files don't need to (redundantly) include <config.h>. * cfg.mk (sc_prohibit_config_h_in_headers): New rule. (_virsh_includes): Delete; instead, inline a smaller number of exclusions... (exclude_file_name_regexp--sc_require_config_h) (exclude_file_name_regexp--sc_require_config_h_first): ...here. * daemon/libvirtd.h (includes): Fix offenders. * src/driver.h (includes): Likewise. * src/gnutls_1_0_compat.h (includes): Likewise. * src/libxl/libxl_conf.h (includes): Likewise. * src/libxl/libxl_driver.h (includes): Likewise. * src/lxc/lxc_conf.h (includes): Likewise. * src/lxc/lxc_driver.h (includes): Likewise. * src/lxc/lxc_fuse.h (includes): Likewise. * src/network/bridge_driver.h (includes): Likewise. * src/phyp/phyp_driver.h (includes): Likewise. * src/qemu/qemu_conf.h (includes): Likewise. * src/util/virnetlink.h (includes): Likewise. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Osier Yang 提交于
The document for "vol-resize" says the new capacity will be sparse unless "--allocate" is specified, however, the "--allocate" flag is never implemented. This implements the "--allocate" flag for fs backend's raw type volume, based on posix_fallocate and the syscall SYS_fallocate.
-
- 03 6月, 2013 1 次提交
-
-
由 Martin Kletzander 提交于
For USB devices, dev->name gets formated as %.3o:%.3o even though the numbers are decimal. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=967712
-
- 01 6月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
We can't use GNULIB's fprintf-posix due to licensing incompatibilities. We do already have a portable formatting via virAsprintf() which we got from GNULIB though. We can use to create a virFilePrintf() function. But really gnulib could just provide a 'fprintf' module, that depended on just its 'asprintf' module. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 29 5月, 2013 1 次提交
-
-
由 Eric Blake 提交于
Compilation for mingw failed: ../../src/util/virutil.c: In function 'virGetWin32DirectoryRoot': ../../src/util/virutil.c:1094:9: error: unused variable 'ret' [-Werror=unused-variable] * src/util/virutil.c (virGetWin32DirectoryRoot): Silence compiler warning. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 28 5月, 2013 2 次提交
-
-
由 Eric Blake 提交于
I noticed several unusual spacings in for loops, and decided to fix them up. See the next commit for the syntax check that found all of these. * examples/domsuspend/suspend.c (main): Fix spacing. * python/libvirt-override.c: Likewise. * src/conf/interface_conf.c: Likewise. * src/security/virt-aa-helper.c: Likewise. * src/util/virconf.c: Likewise. * src/util/virhook.c: Likewise. * src/util/virlog.c: Likewise. * src/util/virsocketaddr.c: Likewise. * src/util/virsysinfo.c: Likewise. * src/util/viruuid.c: Likewise. * src/vbox/vbox_tmpl.c: Likewise. * src/xen/xen_hypervisor.c: Likewise. * tools/virsh-domain-monitor.c (vshDomainStateToString): Drop default case, to let compiler check us. * tools/virsh-domain.c (vshDomainVcpuStateToString): Likewise. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 yangdongsheng 提交于
When src is NULL, VIR_STRDUP will return 0 directly. This patch will set dest to NULL before VIR_STRDUP return. Example: [root@yds-pc libvirt]# virsh Welcome to virsh, the virtualization interactive terminal. Type: 'help' for help with commands 'quit' to quit virsh # connect error: Failed to connect to the hypervisor error: internal error Unable to parse URI �N�* Signed-off-by: Nyangdongsheng <yangds.fnst@cn.fujitsu.com> Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 24 5月, 2013 6 次提交
-
-
由 Michal Privoznik 提交于
With previous patch, we accept negative value as length of string to duplicate. So there is no need to pass strlen(src) in case we want to do duplicate the whole string.
-
由 Michal Privoznik 提交于
It may shorten the code a bit as the following pattern: VIR_STRNDUP(dst, src, cond ? n : strlen(src)) is used on several places among our code. However, we can move the strlen into virStrndup and thus write just: VIR_STRNDUP(dst, src, cond ? n : -1)
-
由 Viktor Mihajlovski 提交于
Currently, the controllers argument to virCgroupDetect acts both as a result filter and a required controller specification, which is a bit overloaded. If both functionalities are needed, it would be better to have them seperated into a filter and a requirement mask. The only situation where it is used today is to ensure that only CPU related controllers are used for the VCPU directories. But here we clearly do not want to enforce the existence of cpu, cpuacct and specifically not cpuset at the same time. This commit changes the semantics of controllers to "filter only". Should a required mask ever be needed, more work will have to be done. Signed-off-by: NViktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
-
由 Michal Privoznik 提交于
-
由 Michal Privoznik 提交于
This commit is separate due to unusual paradigm compared to the most source files.
-
由 Michal Privoznik 提交于
Within whole vircgroup.c we 'return -errno', e.g. 'return -ENOMEM'. However, in this specific function virCgroupAddTaskStrController we weren't returning -ENOMEM but -1 despite fact that later in the function we are returning one of errno values indeed.
-
- 23 5月, 2013 1 次提交
-
-
由 Michal Privoznik 提交于
In my previous patches I enabled the IFF_MULTI_QUEUE flag every time the user requested multiqueue TAP device. However, this works only at runtime. During build time the flag may be undeclared.
-
- 22 5月, 2013 2 次提交
-
-
由 Michal Privoznik 提交于
In order to learn libvirt multiqueue several things must be done: 1) The '/dev/net/tun' device needs to be opened multiple times with IFF_MULTI_QUEUE flag passed to ioctl(fd, TUNSETIFF, &ifr); 2) Similarly, '/dev/vhost-net' must be opened as many times as in 1) in order to keep 1:1 ratio recommended by qemu and kernel folks. 3) The command line construction code needs to switch from 'fd=X' to 'fds=X:Y:...:Z' and from 'vhostfd=X' to 'vhostfds=X:Y:...:Z'. 4) The monitor handling code needs to learn to pass multiple FDs.
-
由 Eric Blake 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=965169 documents a problem starting domains when cgroups are enabled; I was able to reliably reproduce the race about 5% of the time when I added hooks to domain startup by 3 seconds (as that seemed to be about the length of time that qemu created and then closed a temporary thread, probably related to aio handling of initially opening a disk image). The problem has existed since we introduced virCgroupMoveTask in commit 91028296 (v0.10.0). There are some inherent TOCTTOU races when moving tasks between kernel cgroups, precisely because threads can be created or completed in the window between when we read a thread id from the source and when we write to the destination. As the goal of virCgroupMoveTask is merely to move ALL tasks into the new cgroup, it is sufficient to iterate until no more threads are being created in the old group, and ignoring any threads that die before we can move them. It would be nicer to start the threads in the right cgroup to begin with, but by default, all child threads are created in the same cgroup as their parent, and we don't want vcpu child threads in the emulator cgroup, so I don't see any good way of avoiding the move. It would also be nice if the kernel were to implement something like rename() as a way to atomically move a group of threads from one cgroup to another, instead of forcing a window where we have to read and parse the source, then format and write back into the destination. * src/util/vircgroup.c (virCgroupAddTaskStrController): Ignore ESRCH, because a thread ended between read and write attempts. (virCgroupMoveTask): Loop until all threads have moved. Signed-off-by: NEric Blake <eblake@redhat.com>
-