- 06 12月, 2014 1 次提交
-
-
由 John Ferlan 提交于
Add 3 new optional options for the pool-create-as and pool-define-as command in order to define the 3 elements required in order to add an auth element, such as: <auth type='chap' username='myuser'> <secret usage='libvirtiscsi'/> </auth>
-
- 15 11月, 2014 2 次提交
-
-
由 Martin Kletzander 提交于
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
This macro is being used as an inline body after an if and might get pretty confusing. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 13 11月, 2014 1 次提交
-
-
由 Martin Kletzander 提交于
According to comments in parsing functions, optional options should be specified *after* required ones. It makes sense and help output looks cleaner. The only exceptions are options with type == VSH_OT_ARGV. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 11 9月, 2014 1 次提交
-
-
由 John Ferlan 提交于
Since 0766783a Coverity complains that the EDIT_FREE definition results in DEADCODE. As it turns out with the change to use the EDIT_FREE macro the call to vir*Free() wouldn't be necessary nor would it happen... Prior code to above commitid would : vir*Ptr foo = NULL; ... foo = vir*GetXMLDesc() ... vir*Free(foo); foo = vir*DefineXML() ... And thus the free was needed. With the change to use EDIT_FREE the same code changed to: vir*Ptr foo = NULL; vir*Ptr foo_edited = NULL; ... foo = vir*GetXMLDesc() ... if (foo_edited) vir*Free(foo_edited); foo_edited = vir*DefineXML() ... However, foo_edited could never be set in the code path - even with all the goto's since the only way for it to be set is if vir*DefineXML() succeeds in which case the code to allow a retry (and thus all the goto's) never leaves foo_edited set All error paths lead to "cleanup:" which causes both foo and foo_edited to call the respective vir*Free() routines if set. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
- 12 8月, 2014 1 次提交
-
-
由 Roman Bogorodskiy 提交于
Implement ZFS storage backend driver. Currently supported only on FreeBSD because of ZFS limitations on Linux. Features supported: - pool-start, pool-stop - pool-info - vol-list - vol-create / vol-delete Pool definition looks like that: <pool type='zfs'> <name>myzfspool</name> <source> <name>actualpoolname</name> </source> </pool> The 'actualpoolname' value is a name of the pool on the system, such as shown by 'zpool list' command. Target makes no sense here because volumes path is always /dev/zvol/$poolname/$volname. User has to create a pool on his own, this driver doesn't support pool creation currently. A volume could be used with Qemu by adding an entry like this: <disk type='volume' device='disk'> <driver name='qemu' type='raw'/> <source pool='myzfspool' volume='vol5'/> <target dev='hdc' bus='ide'/> </disk>
-
- 15 5月, 2014 1 次提交
-
-
由 Julio Faracco 提交于
In "src/conf/" there are many enumeration (enum) declarations. Similar to the recent cleanup to "src/util" directory, it's better to use a typedef for variable types, function types and other usages. Other enumeration and folders will be changed to typedef's in the future. Most of the files changed in this commit are related to storage (storage_conf) enums. Signed-off-by: NJulio Faracco <jcfaracco@gmail.com> Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 25 3月, 2014 1 次提交
-
-
由 Ján Tomko 提交于
-
- 18 3月, 2014 1 次提交
-
-
由 Martin Kletzander 提交于
Commit a1cbe4b5 added a check for spaces around assignments and this patch extends it to checks for spaces around '=='. One exception is virAssertCmpInt where comma after '==' is acceptable (since it is a macro and '==' is its argument). Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 14 3月, 2014 1 次提交
-
-
由 Laine Stump 提交于
These are never seen externally, only passed into libvirt APIs, so in practice this makes no real difference, but it's good to be consistent.
-
- 25 2月, 2014 2 次提交
-
-
由 Eric Blake 提交于
I noticed this while shortening switch statements via VIR_ENUM. Basically, the only ways virAsprintf can fail are if we pass a bogus format string (but we're not THAT bad) or if we run out of memory (but it already warns on our behalf in that case). Throw away the cruft that tries too hard to diagnose a printf failure. * tools/virsh-volume.c (cmdVolList): Simplify. * tools/virsh-pool.c (cmdPoolList): Likewise. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Eric Blake 提交于
Dan Berrange suggested that using VIR_ENUM_IMPL is more compact than open-coding switch statements, and still just as forceful at making us remember to update lists if we add enum values in the future. Make this change throughout virsh. Sure enough, doing this change caught that we missed at least VIR_STORAGE_VOL_NETDIR. * tools/virsh-domain-monitor.c (vshDomainIOErrorToString) (vshDomainControlStateToString, vshDomainStateToString) (vshDomainStateReasonToString): Change switch to enum lookup. (cmdDomControl, cmdDominfo): Update caller. * tools/virsh-domain.c (vshDomainVcpuStateToString) (vshDomainEventToString, vshDomainEventDetailToString): Change switch to enum lookup. (vshDomainBlockJobToString, vshDomainJobToString): New functions. (cmdVcpuinfo, cmdBlockJob, cmdDomjobinfo, cmdEvent): Update callers. * tools/virsh-network.c (vshNetworkEventToString): Change switch to enum lookup. * tools/virsh-pool.c (vshStoragePoolStateToString): New function. (cmdPoolList, cmdPoolInfo): Update callers. * tools/virsh-volume.c (vshVolumeTypeToString): Change switch to enum lookup. (cmdVolInfo, cmdVolList): Update callers. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 19 12月, 2013 1 次提交
-
-
由 Peter Krempa 提交于
Recent addition of the gluster pool type omitted fixing the virsh and virConnectListAllStoragePool filters. A typecast of the converting function in virsh showed that also the sheepdog pool was omitted in the command parser. This patch adds gluster pool filtering support and fixes virsh to properly convert all supported storage pool types. The added typecast should avoid doing such mistakes in the future.
-
- 13 11月, 2013 1 次提交
-
-
由 Peter Krempa 提交于
Change the alignment to match the domain listing function. Before: $ virsh pool-list Name State Autostart ----------------------------------------- boot-scratch active no default active no glusterpool active no $ virsh pool-list --details Name State Autostart Persistent Capacity Allocation Available ------------------------------------------------------------------------------- boot-scratch running no yes 117.99 GiB 101.40 GiB 16.60 GiB default running no yes 117.99 GiB 101.40 GiB 16.60 GiB glusterpool running no yes 29.40 GiB 44.23 MiB 29.36 GiB After: $ virsh pool-list Name State Autostart ------------------------------------------- boot-scratch active no default active no glusterpool active no $ virsh pool-list --details Name State Autostart Persistent Capacity Allocation Available --------------------------------------------------------------------------------- boot-scratch running no yes 117.99 GiB 101.40 GiB 16.60 GiB default running no yes 117.99 GiB 101.40 GiB 16.60 GiB glusterpool running no yes 29.40 GiB 44.23 MiB 29.36 GiB
-
- 28 8月, 2013 2 次提交
-
-
由 Michal Privoznik 提交于
Since 785ff34b we are using the outputStr variable in cleanup label. However, there is a possibility to jump to the label before the variable has been declared: virsh-pool.c: In function 'cmdPoolList': virsh-pool.c:1121:25: error: jump skips variable initialization [-Werror=jump-misses-init] goto asprintf_failure; ^ virsh-pool.c:1308:1: note: label 'asprintf_failure' defined here asprintf_failure: ^ virsh-pool.c:1267:11: note: 'outputStr' declared here char *outputStr = NULL;
-
由 Ján Tomko 提交于
==23== 41 bytes in 1 blocks are definitely lost in loss record 626 of 727 ==23== by 0x4F0099F: virAsprintfInternal (virstring.c:358) ==23== by 0x15D2C9: cmdPoolList (virsh-pool.c:1268) https://bugzilla.redhat.com/show_bug.cgi?id=1001536
-
- 20 8月, 2013 2 次提交
-
-
由 Peter Krempa 提交于
Explicitly let the user know about the unknown pool type.
-
由 Peter Krempa 提交于
At a slightly larger memory expense allow stealing of items from the string array returned from vshStringToArray and turn the result into a string list compatible with virStringSplit. This will allow to use the common dealloc function. This patch also fixes a few forgotten checks of return from vshStringToArray and one memory leak.
-
- 11 7月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
Convert the type of loop iterators named 'i', 'j', k', 'ii', 'jj', 'kk', to be 'size_t' instead of 'int' or 'unsigned int', also santizing 'ii', 'jj', 'kk' to use the normal 'i', 'j', 'k' naming Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 11 5月, 2013 1 次提交
-
-
由 Laine Stump 提交于
These all existed before virfile.c was created, and for some reason weren't moved. This is mostly straightfoward, although the syntax rule prohibiting write() had to be changed to have an exception for virfile.c instead of virutil.c. This movement pointed out that there is a function called virBuildPath(), and another almost identical function called virFileBuildPath(). They really should be a single function, which I'll take care of as soon as I figure out what the arglist should look like.
-
- 02 5月, 2013 1 次提交
-
-
由 Michal Privoznik 提交于
The source code base needs to be adapted as well. Some files include virutil.h just for the string related functions (here, the include is substituted to match the new file), some include virutil.h without any need (here, the include is removed), and some require both.
-
- 15 3月, 2013 1 次提交
-
-
由 Martin Kletzander 提交于
After we switched to C99 initialization, I noticed there were many places where the specification of .flags parameter differed. After going through many options and deciding whether to unify the initialization to be '.flags = 0' or '.flags = VSH_OFLAG_NONE', I realized both can be removed and it makes the code easier to go through.
-
- 13 2月, 2013 2 次提交
-
-
由 Michal Privoznik 提交于
-
由 Michal Privoznik 提交于
-
- 04 2月, 2013 2 次提交
-
-
由 Peter Krempa 提交于
Rework most of option string retrievals to the new helper.
-
由 Peter Krempa 提交于
-
- 17 1月, 2013 1 次提交
-
-
由 Michal Privoznik 提交于
-
- 21 12月, 2012 4 次提交
-
-
由 Daniel P. Berrange 提交于
-
由 Daniel P. Berrange 提交于
-
由 Daniel P. Berrange 提交于
-
由 Daniel P. Berrange 提交于
Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 30 11月, 2012 1 次提交
-
-
由 Ján Tomko 提交于
On error, virStoragePoolGetAutostart would return -1 leaving autostart untouched. Removed the misleading debug message as well. Error: CHECKED_RETURN (CWE-252): libvirt-0.10.2/tools/virsh-pool.c:1386: unchecked_value: No check of the return value of "virStoragePoolGetAutostart(pool, &autostart)".
-
- 02 11月, 2012 1 次提交
-
-
由 Daniel P. Berrange 提交于
The libvirt coding standard is to use 'function(...args...)' instead of 'function (...args...)'. A non-trivial number of places did not follow this rule and are fixed in this patch. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 21 9月, 2012 1 次提交
-
-
由 Eric Blake 提交于
https://www.gnu.org/licenses/gpl-howto.html recommends that the 'If not, see <url>.' phrase be a separate sentence. * tests/securityselinuxhelper.c: Remove doubled line. * tests/securityselinuxtest.c: Likewise. * globally: s/; If/. If/
-
- 17 9月, 2012 1 次提交
-
-
由 Osier Yang 提交于
This improve helper vshStringToArray to accept const string as argument instead. To not convert the const string when using vshStringToArray, and thus avoid motifying it.
-
- 13 9月, 2012 1 次提交
-
-
由 Osier Yang 提交于
And redundant error resetting. Pushed under trivial rule.
-
- 06 9月, 2012 2 次提交
-
-
由 Eric Blake 提交于
A last minute rename in commit fc122e1a to virsh.h was not properly reflected when rebasing virsh-pool.c in commit 93a346d3. * tools/virsh-pool.c (vshStoragePoolListCollect): Use VSH_MATCH, not MATCH.
-
由 Osier Yang 提交于
tools/virsh-pool.c: * vshStoragePoolSorter to sort the pool list by pool name. * struct vshStoragePoolList to present the pool list, pool info is collected by list->poolinfo if 'details' is specified by user. * vshStoragePoolListFree to free the pool list * vshStoragePoolListCollect to collect the pool list, new API virStorageListAllPools is tried first, if it's not supported, fall back to older APIs. * New options --persistent, --transient, --autostart, --no-autostart and --type for pool-list. --persistent or --transient is to filter the returned pool list by whether the pool is persistent or not. --autostart or --no-autostart is to filter the returned pool list by whether the pool is autostarting or not. --type is to filter the pools by pool types. E.g. % virsh pool-list --all --persistent --type dir,disk tools/virsh.pod: * Add documentations for the new options.
-
- 31 8月, 2012 1 次提交
-
-
由 Peter Krempa 提交于
Now that vshCommandRun() checks for the connection automaticaly, remove all of the redundant checks in the code. vshConnectionUsability() no longer needs to be exported and this patch marks it static.
-
- 21 8月, 2012 1 次提交
-
-
由 Eric Blake 提交于
More in a series of file splits. * tools/virsh-pool.h: New file. * tools/Makefile.am (virsh_SOURCES): Build it. * tools/virsh.c: Use new header. * tools/virsh-pool.c: Likewise. (virCommandOptPoolBy): Fix flag usage.
-