- 03 4月, 2019 6 次提交
-
-
由 Ján Tomko 提交于
Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
由 Ján Tomko 提交于
We've been open-coding virStringListFreeCount for cleaning up the completion list we're building. This had the advantage of zeoring the pointer afterwards, which is no longer needed now that we compile the list in 'tmp' instead of 'ret'. Since all our lists are NULL-terminated anyway, switch to using virStringListFree via the VIR_AUTOSTRINGLIST macro. Fixes nearly impossible NULL dereferences in virshNWFilterBindingNameCompleter virshNWFilterNameCompleter virshNodeDeviceNameCompleter virshNetworkNameCompleter virshInterfaceNameCompleter virshStoragePoolNameCompleter virshDomainNameCompleter which jumped on the error label after a failed allocation and a possible one in virshStorageVolNameCompleter which jumped there when we fail to fetch the list of volumes. Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
由 Ján Tomko 提交于
Merge the cleanup of fetched items for the success and the error paths. Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
由 Ján Tomko 提交于
Unify the cleanup paths for error and success. Now that 'ret' is only set (from tmp) on the success path, it is safe to jump right before 'return ret' after processing the error block. Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
由 Ján Tomko 提交于
Construct the potential return value in an array called 'tmp' and only assign it to 'ret' if we're going to return it. This will allow us to unify the error and success paths. Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
由 Ján Tomko 提交于
Use the posessive determiner instead of a contracted auxiliary. Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
- 29 3月, 2019 1 次提交
-
-
由 Eric Blake 提交于
Most of our completers used the pattern: if ((nITEM = virITEMListAll()) < 0) return NULL; but the virDomainSnapshot and virStorageVolume completers were instead using goto error. If the ListAll fails with -1, the cleanup label was running a loop of 'size_t i < int nITEM', which is an extreme waste of CPU cycles. Broken since their introduction in v4.1. Fixes: f81f8b62 Fixes: 4cb4b649Reported-by: NJán Tomko <jtomko@redhat.com> Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 05 3月, 2019 1 次提交
-
-
由 Lin Ma 提交于
Signed-off-by: NLin Ma <lma@suse.com>
-
- 20 2月, 2019 1 次提交
-
-
由 Daniel P. Berrangé 提交于
The function must return a pointer, not a boolean. Fortunately 'false' is equivalent to 'NULL' so this bug no had ill effect previously. Reviewed-by: NJán Tomko <jtomko@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 25 1月, 2019 1 次提交
-
-
由 Michal Privoznik 提交于
Strictly speaking, this should go near vshCompleter typedef declaration. However, I find it more useful near actual completer implementations. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
- 14 12月, 2018 1 次提交
-
-
由 Daniel P. Berrangé 提交于
In many files there are header comments that contain an Author: statement, supposedly reflecting who originally wrote the code. In a large collaborative project like libvirt, any non-trivial file will have been modified by a large number of different contributors. IOW, the Author: comments are quickly out of date, omitting people who have made significant contribitions. In some places Author: lines have been added despite the person merely being responsible for creating the file by moving existing code out of another file. IOW, the Author: lines give an incorrect record of authorship. With this all in mind, the comments are useless as a means to identify who to talk to about code in a particular file. Contributors will always be better off using 'git log' and 'git blame' if they need to find the author of a particular bit of code. This commit thus deletes all Author: comments from the source and adds a rule to prevent them reappearing. The Copyright headers are similarly misleading and inaccurate, however, we cannot delete these as they have legal meaning, despite being largely inaccurate. In addition only the copyright holder is permitted to change their respective copyright statement. Reviewed-by: NErik Skultety <eskultet@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 12 7月, 2018 2 次提交
-
-
由 Simon Kobyda 提交于
After you go through command mentioned above, completer finds what state the device is currently in, and suggests an opposite state. Signed-off-by: NSimon Kobyda <skobyda@redhat.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Simon Kobyda 提交于
Functions virshSecretEventNameCompleter, virshPoolEventNameCompleter, virshNodedevEventNameCompleter allocates only enough space for array of N strings. However these are null terminated strings, so program needs to alloc space for array of N + 1 strings. How to replicate error: valgrind virsh, use completer for 'nodedev-event --event' or 'pool-event --event' or 'secret-event --event'. Signed-off-by: NSimon Kobyda <skobyda@redhat.com>
-
- 03 7月, 2018 1 次提交
-
-
由 Michal Privoznik 提交于
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
- 26 6月, 2018 1 次提交
-
-
由 Daniel P. Berrangé 提交于
$ virsh nwfilter-binding-list Port Dev Filter ------------------------------------------------------------------ vnet0 clean-traffic vnet1 clean-traffic $ virsh nwfilter-binding-dumpxml vnet1 <filterbinding> <owner> <name>f25arm7</name> <uuid>12ac8b8c-4f23-4248-ae42-fdcd50c400fd</uuid> </owner> <portdev name='vnet1'/> <mac address='52:54:00:9d:81:b1'/> <filterref filter='clean-traffic'> <parameter name='MAC' value='52:54:00:9d:81:b1'/> </filterref> </filterbinding> Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 25 5月, 2018 1 次提交
-
-
由 Roland Schulz 提交于
Signed-off-by: NRoland Schulz <schullzroll@gmail.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 24 5月, 2018 5 次提交
-
-
由 Roland Schulz 提交于
Signed-off-by: NRoland Schulz <schullzroll@gmail.com>
-
由 Lin Ma 提交于
Signed-off-by: NLin Ma <lma@suse.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Lin Ma 提交于
Signed-off-by: NLin Ma <lma@suse.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Lin Ma 提交于
Signed-off-by: NLin Ma <lma@suse.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Lin Ma 提交于
The patch code originally authored by Michal Privoznik, Please refer to https://www.redhat.com/archives/libvir-list/2018-May/msg01022.htmlSigned-off-by: NLin Ma <lma@suse.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 23 5月, 2018 1 次提交
-
-
由 Roland Schulz 提交于
Signed-off-by: NRoland Schulz <schullzroll@gmail.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 22 5月, 2018 1 次提交
-
-
由 Roland Schulz 提交于
Signed-off-by: NRoland Schulz <schullzroll@gmail.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 21 5月, 2018 2 次提交
-
-
由 Martin Kletzander 提交于
These two functions were duplicating some cleanup paths, so let's just merge both cleanup and error paths together. To distinguish whether we need to clean-up the return value let's keep it in @tmp until the function is successful in which case we set @ret to the value of @tmp and set @tmp to NULL. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Roland Schulz 提交于
Returns list of host page sizes from capabilities XML. Signed-off-by: NRoland Schulz <schullzroll@gmail.com>
-
- 17 5月, 2018 1 次提交
-
-
由 Lin Ma 提交于
Signed-off-by: NLin Ma <lma@suse.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 31 1月, 2018 1 次提交
-
-
由 Michal Privoznik 提交于
Only a small subset of VIR_CONNECT_LIST_DOMAINS_* flags are actually used for this completer. Remove the unused ones. Note that this is unrelated to other commands using VIR_CONNECT_LIST_DOMAINS_* (i.e. cmdList) as this commit targets the completer only and nothing else. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 24 1月, 2018 8 次提交
-
-
由 Michal Privoznik 提交于
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Michal Privoznik 提交于
This is a slight change from previous patches since virSecret does not have a name only UUID strings. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Michal Privoznik 提交于
The virConnectListAllNWFilters() has no extra flags yet, which simplifies things a bit. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Michal Privoznik 提交于
Yet again, we don't need listing by device capabilities, so flags are unused. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Michal Privoznik 提交于
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Michal Privoznik 提交于
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Michal Privoznik 提交于
This one is a bit simpler since virStoragePoolListAllVolumes() has no flags yet. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Michal Privoznik 提交于
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
- 12 1月, 2018 2 次提交
-
-
由 Michal Privoznik 提交于
For given domain fetch list of defined interfaces. This can be used for commands like domif-getlink and others. If available, the interface name is returned (e.g. "vnet0", usually available only for running domains), if not the MAC address is returned. Moreover, the detach-interface command requires only MAC address and therefore we have new flag that forces the completer to return just the MAC address. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
Now that we have everything prepared let the fun begin. This completer is very simple and returns domain names. Moreover, depending on the command it can return just a subset of domains (e.g. only running/paused/transient/.. ones). Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-