- 18 8月, 2017 1 次提交
-
-
由 Peter Krempa 提交于
The helper returns true if a string contains any of the given chars. virStringHasControlChars can be reimplemented using that helper. Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
-
- 17 8月, 2017 39 次提交
-
-
由 Erik Skultety 提交于
Let this new method handle the device object we obtained from the monitor in order to enhance readability. Signed-off-by: NErik Skultety <eskultet@redhat.com>
-
由 Erik Skultety 提交于
So we have a sanity check for the udev monitor fd. Theoretically, it could happen that the udev monitor fd changes (due to our own wrongdoing, hence the 'sanity' here) and if that happens it means we are handling an event from a different entity than we think, thus we should remove the handle if someone somewhere somehow hits this hypothetical case. Signed-off-by: NErik Skultety <eskultet@redhat.com>
-
由 Erik Skultety 提交于
It might happen that virFileResolveLinkHelper fails on the lstat system call. virFileResolveLink expects the caller to report an error when it fails, however this wasn't the case for udevProcessMediatedDevice. Signed-off-by: NErik Skultety <eskultet@redhat.com>
-
由 Christian Ehrhardt 提交于
Testing qemu-2.10-rc3 shows issues like: qemu-system-aarch64: -drive file=/home/ubuntu/vm-start-stop/vms/ 7936-0_CODE.fd,if=pflash,format=raw,unit=1: Failed to unlock byte 100 There is an apparmor deny due to qemu now locking those files: apparmor="DENIED" operation="file_lock" [...] name="/home/ubuntu/vm-start-stop/vms/7936-0_CODE.fd" name="/var/lib/uvtool/libvirt/images/kvmguest-artful-normal.qcow" [...] comm="qemu-system-aarch64" requested_mask="k" denied_mask="k" The profile needs to allow locking for loader and nvram files via the locking (k) rule. Signed-off-by: NChristian Ehrhardt <christian.ehrhardt@canonical.com>
-
由 Christian Ehrhardt 提交于
Testing qemu-2.10-rc2 shows issues like: qemu-system-x86_64: -drive file=/var/lib/uvtool/libvirt/images/kvmguest- \ artful-normal.qcow,format=qcow2,if=none,id=drive-virtio-disk0: Failed to lock byte 100 It seems the following qemu commit changed the needs for the backing image rules: (qemu) commit 244a5668106297378391b768e7288eb157616f64 Author: Fam Zheng <famz@redhat.com> file-posix: Add image locking to perm operations The block appears as: apparmor="DENIED" operation="file_lock" [...] name="/var/lib/uvtool/libvirt/images/kvmguest-artful-normal.qcow" [...] comm="qemu-system-x86" requested_mask="k" denied_mask="k" With that qemu change in place the rules generated for the image and backing files need the allowance to also lock (k) the files. Disks are added via add_file_path and with this fix rules now get that permission, but no other rules are changed, example: - "/var/lib/uvtool/libvirt/images/kvmguest-artful-normal-a2.qcow" rw, + "/var/lib/uvtool/libvirt/images/kvmguest-artful-normal-a2.qcow" rwk Signed-off-by: NChristian Ehrhardt <christian.ehrhardt@canonical.com>
-
由 Pavel Hrdina 提交于
XPath is good for random search of elements, not for accessing attributes of one node. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
Using XPath here doesn't add any benefit. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
The XPath call for these cases is more expensive than accessing the XML dom node directly. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
XPath is good for random search of elements, not for accessing attributes of one node. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
XPath is good for random search of elements, not for accessing attributes of one node. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
XPath is good for random search of elements, not for accessing attributes of one node. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
XPath is good for random search of elements, not for accessing attributes of one node. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
XPath is good for random search of elements, not for accessing attributes of one node. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 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>
-
由 Michal Privoznik 提交于
Back in the day when I was implementing QoS for networks there were no self inflating virBitmaps. Only the static ones. Therefore, I had to allocate the whole 8KB of memory in order to keep track of used/unused class IDs. This is rather wasteful because nobody is ever gonna use that much classes (kernel overhead would drastically lower the bandwidth). Anyway, now that we have self inflating bitmaps we can start small and allocate more if there's need for it. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
To make it clearer, let's use @nnames instead of @got for counting the names in the @names array. Keeps things consistent and clear.
-
由 Cole Robinson 提交于
There's some specific logic in qemuBuildCpuCommandLine to support auto adding -cpu qemu 32 for arch=i686 with an x86_64 qemu binary. Add a test case for it
-
由 John Ferlan 提交于
Rename the variable, recent review requested just use of @filter, so be consistent throughout.
-
由 John Ferlan 提交于
Rename the variable, recent review requested just use of @filter, so be consistent throughout.
-
由 John Ferlan 提交于
Rename the variable, recent review requested just use of @filter, so be consistent throughout. NB: Also change the virNWFilterPtr to be @nwfilter to not conflict with the renamed variable.
-
由 John Ferlan 提交于
Rename the variable, recent review requested just use of @filter, so be consistent throughout.
-
由 John Ferlan 提交于
Move from virnetworkobj.h into virnetworkobj.c Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
Use the structure names in the @data setup - makes it easier than going back to find the struct fields to make sure the order of the data is correct. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
To be consistent with the API definition, use the @maxnames instead of @nnames when describing/comparing against the maximum names to be provided for the *ConnectList[Defined]Networks APIs. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
Move the virObjectRef in virNetworkObjAssignDefLocked to after the virHashAddEntry to make it "clearer" why the @ref is being incremented. Upon return from the ObjNew we will have 1 ref on the object already, adding it to the hash table requires the increment. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
Forces callers to use the virNetworkObjEndAPI properly. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
Consistently use @obj for a virNetworkObjPtr. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
In preparation to privatize the virNetworkObj - create an accessor function to get the current @persistent value. Also change the value to a bool rather than an unsigned int (since that's how it's generated anyway). Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
In order to privatize the virNetworkObj create accessors in virnetworkobj in order to handle the get/set of the active value. Also rather than an unsigned int, convert it to a boolean to match other drivers representation and the reality of what it is. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
In preparation for privatizing the virNetworkObj structure, create accessors for the obj->autostart. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
In preparation for making the object private, create a couple of API's to get the obj->def & obj->newDef and set the obj->def. While altering networkxml2conftest.c to use the virNetworkObjSetDef API, fix the name of the variable from @dev to @def Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
In preparation for making the object private, create a couple of API's to get/set the obj->floor_sum. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
In preparation for privatizing virNetworkObj, create accessor function to fetch the @classIdMap. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
Change the variable name to be a bit more descriptive and less confusing when used with the data.network.actual->class_id. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
In preparation for making the object private, create/use a couple of API's to get/set the obj->dnsmasqPid and obj->radvdPid. NB: Since the pid's can sometimes changed based on intervening functions, be sure to always fetch the latest value. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
Since we can only ever have one reference to obj->macmap, rather than only clearing obj->macmap during virNetworkObjUnrefMacMap (e.g. virtual network from networkShutdownNetwork), let's just unconditionally clear the obj->macmap to ensure that some future change that created it's own reference to obj->macmap wouldn't have that reference disappear if virNetworkObjDispose got called. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
In preparation for having a private virNetworkObj - let's create/move some API's that handle the obj->macmap. The API's will be renamed to have a virNetworkObj prefix to follow conventions and the arguments slightly modified to accept what's necessary to complete their task. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
Move networkMacMgrFileName into src/util/virmacmap.c and rename to virMacMapFileName. We're about to move some more MacMgr processing files into virnetworkobj and it doesn't make sense to have this helper in the driver or in virnetworkobj. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-