- 29 4月, 2011 1 次提交
-
-
由 Eric Blake 提交于
We don't use gnulib's sanitizations for vfprintf, but vshDebug was used with %zu, which means that it would fail on mingw. Thank goodness the compiler indirectly caught this for us :) virsh.c: In function 'vshDebug': virsh.c:12105:5: warning: function might be possible candidate for 'ms_printf' format attribute [-Wmissing-format-attribute] since mingw <stdio.h> hasn't yet added gcc attributes to vfprintf. * tools/virsh.c (vshDebug): Avoid vfprintf. (vshPrintExtra): Use lighter-weight fputs. Reported by Matthias Bolte.
-
- 28 4月, 2011 1 次提交
-
-
由 Wen Congyang 提交于
This patch does the following things: 1. The return value of cmdSchedInfoUpdate() can be -1, 0 and 1. So the type of return value should be int not bool.(This function is not a entry of a virsh command, but the name of this function likes cmdXXX) 2. The type of cmdSchedinfo()'s, cmdFreecell()'s, cmdPoolList()'s and cmdVolList()'s return value is bool not int, so change the type of variable ret_val, func_ret and functionReturn. 3. Add a variable functionReturn for cmdMigrate(), cmdAttachInterface(), cmdDetachInterface(), cmdAttachDisk() and cmdDetachDisk() to save the return value. 4. Change the type of variable ret in the function cmdAttachDevice(), cmdDetachDevice(), cmdUpdateDevice(), cmdAttachInterface(), cmdDetachInterface(), cmdAttachDisk() and cmdDetachDisk() to int, as we use it to save the return value of virXXX() and the type of virXXX()'s return value is int not bool. 5. Do some cleanup when virBuff.error is 1. The bug 1-4 were introduced by commit b56fa5bb.
-
- 19 4月, 2011 1 次提交
-
-
由 Eric Blake 提交于
Gnulib already guarantees <stdbool.h>, so it is easier to just use the standardized spellings. * tools/virsh.c (vshCmdDef): Change callback to return real bool. (__vshControl): Change several fields to bool. (vshCommandOptBool): Change return type. All callers updated. * tools/Makefile.am (virsh-net-edit.c, virsh-pool-edit.c): Likewise.
-
- 16 4月, 2011 3 次提交
-
-
由 Eric Blake 提交于
Regression introduced in 0.8.5, commit c1564268. The command 'virsh freecell 0' quit working when it changed from an optional string to an optional integer. This patch introduces a slight change that specifying an option twice is now detected as an error. It also changes things so that a command that has more than 1 required option will not complain about missing options if one but not all of the options were given in long format, as in 'virsh vol-create --pool p file', as well as making positional parsing work for all optional options (each positional argument is associated with the earliest option that has not yet been seen by name). Optional boolean options can appear before required argument options, because they don't affect positional argument parsing, and obviously a required boolean option makes no sense. Technically, this patch renders VSH_OT_STRING and VSH_OT_DATA redundant; but cleaning that up can be a separate patch. No command should ever need more than 32 options, right? :) * tools/virsh.c (vshCmddefGetData, vshCmddefGetOption) (vshCommandCheckOpts): Alter parameters to use bitmaps. (vshCmddefOptParse): New function. (vshCommandParse): Update for better handling of positional arguments. (vshCmddefHelp): Allow unit tests to validate options.
-
由 Eric Blake 提交于
The current state of virsh parsing is that: $ virsh vol-info /path/to/image $ virsh vol-info --pool default /path/to/image $ virsh vol-info --pool default --vol /path/to/image all lookup the volume by path (technically, the last two also attempt a name lookup within a pool, whereas the first skips that step, but the end result is the same); meanwhile: $ virsh vol-info default /path/to/image complains about unexpected data. Why? Because the --pool option is optional, so default was parsed as the --vol argument, and /path/to/image.img doesn't match up with any remaining options that require an argument. For proof, note that: $ virsh vol-info default --vol /path/to/image complains about looking up 'default' - the parser mis-associated both arguments with --vol. Given the above, the only way to specify pool is with an explicit "--pool" argument (you can't specify it positionally). However, named arguments can appear in any order, so: $ virsh vol-info /path/to/image --pool default $ virsh vol-info --vol /path/to/image --pool default have also always worked. Therefore, this patch has no functional change on vol-info option parsing, but only on 'virsh help vol-info' synopsis layout. However, it also allows the next patch to 1) enforce that required options are always first (without this patch, the next patch would fail the testsuite), and 2) allow the user to omit the "--pool" argument. That is, the next patch makes it possible to do: $ virsh vol-info /path/to/image default which to date was not possible. * tools/virsh.c (opts_vol_create_from, opts_vol_clone) (opts_vol_upload, opts_vol_download, opts_vol_delete) (opts_vol_wipe, opts_vol_info, opts_vol_dumpxml, opts_vol_key) (opts_vol_path): List optional pool parameter after required arguments.
-
由 Alexander Todorov 提交于
Allow libvirt-guests to stage a delay between guest startups, to avoid system load caused by back-to-back startup.
-
- 11 4月, 2011 1 次提交
-
-
由 Eric Blake 提交于
Based on a smaller patch developed by Moritoshi Oshiro: https://bugzilla.redhat.com/show_bug.cgi?id=693963 * tools/virsh.pod (freecell): Mention all, and clarify that optional cellno requires --cellno.
-
- 09 4月, 2011 1 次提交
-
-
由 Taku Izumi 提交于
This patch adds the new options (--live, --config, and --current) to "virsh setmaxmem" command. The behavior of above options is the same as that of "virsh setmem". When the --config option is specified, a modification is effective for the persistent domain, while the --live option is specified, a modification is effective for an active domain. The --current option is specified, it affects a current domain. Signed-off-by: NTaku Izumi <izumi.taku@jp.fujitsu.com>
-
- 08 4月, 2011 3 次提交
-
-
由 Eric Blake 提交于
* tools/virsh.pod: Fix grammar, and clarify wording. * src/qemu/qemu_driver.c (qemudDomainObjStart): Drop redundant condition.
-
由 Taku Izumi 提交于
This patch adds the new option (--current) to the "virsh setmem" command. When --current option is specified, it affects a "current" domain. The word "current" denotes that if a domain is running, it affects a running domain only; otherwise it affects a persistent domain. Signed-off-by: NTaku Izumi <izumi.taku@jp.fujitsu.com>
-
由 Taku Izumi 提交于
When the new maximum memory size becomes less than the current memory size, I think it is not the libvirt client but the each driver that decides the behavior (reject the operation or shrink the current memory size). Signed-off-by: NTaku Izumi <izumi.taku@jp.fujitsu.com>
-
- 07 4月, 2011 1 次提交
-
-
由 Osier Yang 提交于
1) Both "qemuDomainStartWithFlags" and "qemuAutostartDomain" try to restore the domain from managedsave'ed image if it exists (by invoking "qemuDomainObjRestore"), but it unlinks the image even if restoring fails, which causes data loss. (This problem exists for "virsh managedsave dom; virsh start dom"). The fix for is to unlink the managed state file only if restoring succeeded. 2) For "virsh save dom; virsh restore dom;", it can cause data corruption if one reuse the saved state file for restoring. Add doc to tell user about it. 3) In "qemuDomainObjStart", if "managed_save" is NULL, we shouldn't fallback to start the domain, skipping it to cleanup as a incidental fix. Discovered by Eric.
-
- 05 4月, 2011 2 次提交
-
-
由 Daniel P. Berrange 提交于
Add a couple of missing ATTRIBUTE_FMT_PRINTF annotations * tools/virsh.c, tests/testutils.c: Add printf format attribute * m4/virt-compile-warnings.m4: Enable -Wmissing-format-attribute
-
由 Matthias Bolte 提交于
-
- 01 4月, 2011 1 次提交
-
-
由 Jiri Denemark 提交于
Commit 78ba748e claims to fix documentation for swap_hard_limit virsh memtune option but it only fixes documentation in formatdomain.html and libvirt.h. This patch completes the task by fixing "virsh help memtune" output and memtune section of virsh man page.
-
- 31 3月, 2011 1 次提交
-
-
由 Eric Blake 提交于
strcase{cmp/str} have the drawback of being sensitive to the global locale; this is unacceptable in a library setting. Prefer a hard-coded C locale alternative for all but virsh, which is user facing and where the global locale isn't changing externally. * .gnulib: Update to latest, for c-strcasestr change. * bootstrap.conf (gnulib_modules): Drop strcasestr, add c-strcase and c-strcasestr. * cfg.mk (sc_avoid_strcase): New rule. (exclude_file_name_regexp--sc_avoid_strcase): New exception. * src/internal.h (STRCASEEQ, STRCASENEQ, STRCASEEQLEN) (STRCASENEQLEN): Adjust offenders. * src/qemu/qemu_monitor_text.c (qemuMonitorTextEjectMedia): Likewise. * tools/virsh.c (namesorter): Document exception.
-
- 29 3月, 2011 1 次提交
-
-
由 Daniel P. Berrange 提交于
The new commands vol-upload and vol-download, allow a local file to be transferred to/from a storage volume. * tools/virsh.c: Add vol-upload and vol-download commands * tools/virsh.pod: Document new commands
-
- 28 3月, 2011 1 次提交
-
-
由 Daniel P. Berrange 提交于
The Open Nebula driver has been unmaintained since it was first introduced. The only commits have been for tree-wide cleanups. It also has a major design flaw, in that it only knows about guests that it has created itself, which makes it of very limited use. Discussions wrt evolution of the VMWare ESX driver, concluded that it should limit itself to single-node ESX operation and not try to manage the multi-node architecture of VirtualCenter. Open Nebula is a cluster like Virtual Center, not a single node system, so the same reasoning applies. The DeltaCloud project includes an Open Nebula driver and is a much better fit architecturally, since it is explicitly targetting the distributed multihost cluster scenario. Thus this patch deletes the libvirt Open Nebula driver with the recommendation that people use DeltaCloud for managing it instead. * configure.ac: Remove probe for xmlrpc & --with-one arg * daemon/Makefile.am, daemon/libvirtd.c, src/Makefile.am: Remove ONE driver build * src/opennebula/one_client.c, src/opennebula/one_client.h, src/opennebula/one_conf.c, src/opennebula/one_conf.h, src/opennebula/one_driver.c, src/opennebula/one_driver.c: Delete files * autobuild.sh, libvirt.spec.in, mingw32-libvirt.spec.in: Remove build rules for Open Nebula * docs/drivers.html.in, docs/sitemap.html.in: Remove reference to OpenNebula * docs/drvone.html.in: Delete file
-
- 16 3月, 2011 1 次提交
-
-
由 Eric Blake 提交于
"virsh connect ''" should try to connect to the default connection, but the previous patch made it issue a warning about an invalid URI. * tools/virsh.c (VSH_OFLAG_EMPTY_OK): New option flag. (vshCommandOptString): Per the declaration, value is required to be non-NULL. Honor new flag. (opts_connect): Allow empty string connection.
-
- 15 3月, 2011 2 次提交
-
-
由 Eric Blake 提交于
* tools/libvirt-guests.init.sh (start, stop, gueststatus): Avoid shell globbing, since valid URIs can contain '?'.
-
由 Philipp Hahn 提交于
At least protect the $uri variable against further expansion by properly quoting it. While doing that, also quote all other variables to protect against shell meta characters. Signed-off-by: NPhilipp Hahn <hahn@univention.de>
-
- 14 3月, 2011 3 次提交
-
-
由 Michal Privoznik 提交于
in case of incorrect option parsing.
-
由 Jiri Denemark 提交于
-
由 Osier Yang 提交于
Otherwise connection of hypervisor driver will be leaked when one shutdown the guest in console. e.g. [root@localhost]# init 0 ...... init: Re-executing /sbin/init Halting system... Power down. error: Failed to disconnect from the hypervisor, 1 leaked reference(s)
-
- 12 3月, 2011 1 次提交
-
-
由 Philipp Hahn 提交于
awk splits the line on consecutive spaces, which breaks getting the name of a domain whose name contains spaces. Use sed instead to strip the "Name:" prefix from the line Signed-off-by: NPhilipp Hahn <hahn@univention.de>
-
- 11 3月, 2011 2 次提交
-
-
由 Gui Jianfeng 提交于
Adding blkiotune command to virsh tool Signed-off-by: NGui Jianfeng <guijianfeng@cn.fujitsu.com>
-
由 Taku Izumi 提交于
This patch adds the new options (--live and --config) to "virsh setmem" command. The behavior of above options is the same as that of "virsh setvcpus" and so on. That is, when the --config option is specified, a modification is effective for the persistent domain. Moreover we can modify the memory size of inactive domains as well as that of active domains. Signed-off-by: NTaku Izumi <izumi.taku@jp.fujitsu.com>
-
- 09 3月, 2011 3 次提交
-
-
由 Guido Günther 提交于
as described at http://wiki.debian.org/ToolChain/DSOLinking https://fedoraproject.org/wiki/UnderstandingDSOLinkChange otherwise the build fails on current Debian unstable with: CCLD virsh /usr/bin/ld: virsh-virsh.o: undefined reference to symbol 'xmlSaveTree@@LIBXML2_2.6.8' /usr/bin/ld: note: 'xmlSaveTree@@LIBXML2_2.6.8' is defined in DSO //usr/lib/libxml2.so.2 so try adding it to the linker command line //usr/lib/libxml2.so.2: could not read symbols: Invalid operation
-
由 Michal Privoznik 提交于
This is needed to detect situations when optional argument was specified with non-integer value: '--int-opt foo'. To keep functions uniform vshCommandOptString function was also changed, because it returns tri-state value as well. Given result pointer is updated only in case of success. If parsing fails, result is not updated at all.
-
由 Michal Privoznik 提交于
This function should return pointer to const, because we don't want to change command option value. Therefore we can ensure const-correctness.
-
- 07 3月, 2011 3 次提交
-
-
由 Daniel P. Berrange 提交于
Not all applications have an existing event loop they need to integrate with. Forcing them to implement the libvirt event loop integration APIs is an undue burden. This just exposes our simple poll() based implementation for apps to use. So instead of calling virEventRegister(....callbacks...) The app would call virEventRegisterDefaultImpl() And then have a thread somewhere calling static bool quit = false; .... while (!quit) virEventRunDefaultImpl() * daemon/libvirtd.c, tools/console.c, tools/virsh.c: Convert to public event loop APIs * include/libvirt/libvirt.h.in, src/libvirt_private.syms: Add virEventRegisterDefaultImpl and virEventRunDefaultImpl * src/util/event.c: Implement virEventRegisterDefaultImpl and virEventRunDefaultImpl using poll() event loop * src/util/event_poll.c: Add full error reporting * src/util/virterror.c, include/libvirt/virterror.h: Add VIR_FROM_EVENTS
-
由 Daniel P. Berrange 提交于
The event loop implementation is used by more than just the daemon, so move it into the shared area. * daemon/event.c, src/util/event_poll.c: Renamed * daemon/event.h, src/util/event_poll.h: Renamed * tools/Makefile.am, tools/console.c, tools/virsh.c: Update to use new virEventPoll APIs * daemon/mdns.c, daemon/mdns.c, daemon/Makefile.am: Update to use new virEventPoll APIs
-
由 Daniel P. Berrange 提交于
The daemon code calls virEventAddHandleImpl directly instead of calling the wrapper virEventAddHandle. * tools/console.c, daemon/libvirtd.c, daemon/mdns.c: Convert to use primary event APIs
-
- 05 3月, 2011 1 次提交
-
-
由 Phil Petty 提交于
Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 24 2月, 2011 1 次提交
-
-
由 Daniel P. Berrange 提交于
Remove the <stdbool.h> header from all source files / headers and just put it into internal.h * src/internal.h: Add <stdbool.h>
-
- 23 2月, 2011 1 次提交
-
-
由 Daniel P. Berrange 提交于
In a couple of commands virsh catches & ignores errors, but fails to reset last_error. Thus the error is ignored, but still reported to the user. * tools/virsh.c: Reset last_error if ignoring an error
-
- 22 2月, 2011 4 次提交
-
-
由 Osier Yang 提交于
Otherwise extra information will be printed even if "--quiet" is specified. * tools/virsh.c
-
由 Dan Kenigsberg 提交于
Alas, the shell is not a real programming language. Patch generated by manual confirmation of vim's s/[^"]\@<=\$\S\+\s\@=/"&"/gc and s/\(echo \)\@<=[^"].*\$.*$/"&"/c matches. This patch generate a lot of noise and carries little benefits, as I do not really expect $PKI to contain spaces or backticks. I'm just fuming, and would not really mind if this patch is ignored
-
由 Dan Kenigsberg 提交于
-
由 Eric Blake 提交于
Right now, 'man libvirtd' includes information that depends on configure results, so it must be generated on the fly and live in $(builddir); however, requiring pod2man on all end user machines is overkill. Meanwhile, 'man virsh' doesn't mention any configure results, so it can be built at 'make dist' time. If that situation changes in the future, we can generate virsh.1 in the same way that we generate libvirtd.8. * daemon/Makefile.am (libvirtd.8.in): New rule, to run pod2man in advance of distribution. (libvirtd.8): Use only sed from tarball. (EXTRA_DIST): Ship new file. (libvirtd.pod): Delete unused rule. (man8_MANS): Let automake know which section to use. (CLEANFILES, MAINTAINERCLEANFILES): Adjust to new files. * tools/Makefile.am (dist_man1_MANS): Distribute pre-built man pages, fine since they don't require any substitution. (virt-xml-validate.1, virt-pki-validate.1): Change input source. (virsh.1): Build into srcdir. (CLEANFILES, MAINTAINERCLEANFILES): Adjust to new build style. * daemon/.gitignore: Update. Reported by Diego Elio Pettenò.
-