- 18 11月, 2010 2 次提交
-
-
由 Eric Blake 提交于
* cfg.mk (sc_prohibit_sprintf): New rule. (sc_prohibit_asprintf): Avoid false positives. * docs/hacking.html.in (Printf-style functions): Document the policy. * HACKING: Regenerate. * .x-sc_prohibit_sprintf: New exemptions. * Makefile.am (syntax_check_exceptions): Ship new file. * src/vbox/vbox_tmpl.c (vboxStartMachine, vboxAttachUSB): Use virAsprintf instead. * src/uml/uml_driver.c (umlOpenMonitor): Use snprintf instead. * tools/virsh.c (cmdDetachInterface): Likewise. * src/security/security_selinux.c (SELinuxGenSecurityLabel): Likewise. * src/openvz/openvz_driver.c (openvzDomainDefineCmd): Likewise, and ensure large enough buffer.
-
由 Eric Blake 提交于
Per the gettext developer: http://lists.gnu.org/archive/html/bug-gnu-utils/2010-10/msg00019.html http://lists.gnu.org/archive/html/bug-gnu-utils/2010-10/msg00021.html gettext() doesn't work correctly on all platforms unless you have called setlocale(). Furthermore, gnulib's gettext.h has provisions for setting up a default locale, which is the preferred method for libraries to use gettext without having to call textdomain() and override the main program's default domain (virInitialize already calls bindtextdomain(), but this is insufficient without the setlocale() added in this patch; and a redundant bindtextdomain() in this patch doesn't hurt, but serves as a good example for other packages that need to bind a second translation domain). This patch is needed to silence a new gnulib 'make syntax-check' rule in the next patch. * daemon/libvirtd.c (main): Setup locale and gettext. * src/lxc/lxc_controller.c (main): Likewise. * src/security/virt-aa-helper.c (main): Likewise. * src/storage/parthelper.c (main): Likewise. * tools/virsh.c (main): Fix exit status. * src/internal.h (DEFAULT_TEXT_DOMAIN): Define, for gettext.h. (_): Simplify definition accordingly. * po/POTFILES.in: Add src/storage/parthelper.c.
-
- 17 11月, 2010 3 次提交
-
-
由 Eric Blake 提交于
* bootstrap.conf (gnulib_modules): Add configmake. * daemon/Makefile.am (libvirtd_CFLAGS): Drop defines provided by gnulib. * src/Makefile.am (INCLUDES): Likewise. * tests/Makefile.am (INCLUDES): Likewise. * tools/Makefile.am (virsh_CFLAGS): Likewise. * daemon/libvirtd.c (qemudInitPaths, usage, main): Update clients. * src/cpu/cpu_map.c (CPUMAPFILE): Likewise. * src/driver.c (DEFAULT_DRIVER_DIR): Likewise. * src/internal.h (_): Likewise. * src/libvirt.c (virInitialize): Likewise. * src/lxc/lxc_conf.h (LXC_CONFIG_DIR, LXC_STATE_DIR, LXC_LOG_DIR): Likewise. * src/lxc/lxc_conf.c (lxcCapsInit, lxcLoadDriverConfig): Likewise. * src/network/bridge_driver.c (NETWORK_PID_DIR) (NETWORK_STATE_DIR, DNSMASQ_STATE_DIR, networkStartup): Likewise. * src/nwfilter/nwfilter_driver.c (nwfilterDriverStartup): Likewise. * src/qemu/qemu_conf.c (qemudLoadDriverConfig): Likewise. * src/qemu/qemu_driver.c (qemudStartup): Likewise. * src/remote/remote_driver.h (LIBVIRTD_PRIV_UNIX_SOCKET) (LIBVIRTD_PRIV_UNIX_SOCKET_RO, LIBVIRTD_CONFIGURATION_FILE) (LIBVIRT_PKI_DIR): Likewise. * src/secret/secret_driver.c (secretDriverStartup): Likewise. * src/security/security_apparmor.c (VIRT_AA_HELPER): Likewise. * src/security/virt-aa-helper.c (main): Likewise. * src/storage/storage_backend_disk.c (PARTHELPER): Likewise. * src/storage/storage_driver.c (storageDriverStartup): Likewise. * src/uml/uml_driver.c (TEMPDIR, umlStartup): Likewise. * src/util/hooks.c (LIBVIRT_HOOK_DIR): Likewise. * tools/virsh.c (main): Likewise. * docs/hooks.html.in: Likewise.
-
由 Stefan Berger 提交于
I am replacing the last instances of close() I found with VIR_CLOSE() / VIR_FORCE_CLOSE respectively. The first part patches virsh, which I missed out on previously. The 2nd patch I had left out intentionally to look at it more carefully: The 'closed' variable could be easily removed since it wasn't used anywhere else. The possible race condition that could result from the filedescriptor being closed and not set to -1 (and possibly let us write into 'something' totally different if the fd was allocated by another thread) seems to be prevented by the qemuMonitorLock() already placed around the code that reads from or writes to the fd. So the change of this code as shown in the patch should not have any side-effects.
-
由 Osier Yang 提交于
To list basic information about the network. * tools/virsh.c * tools/virsh.pod
-
- 12 11月, 2010 2 次提交
-
-
由 Daniel P. Berrange 提交于
The event watches need to be removed before the event loop terminates, otherwise they cause a dangling reference to be held on the virStreamPtr, which in turns holds a reference on virConnectPtr, which in turn causes errors like "Failed to disconnect from the hypervisor" * tools/console.c: Remove watches before event loop quits * tools/virsh.c: Print out dangling reference count
-
由 Daniel P. Berrange 提交于
This re-writes the 'virsh console' command so that it uses the new streams API. This lets it run remotely and/or as a non-root user. This requires that virsh be linked against the simple event loop from libvirtd in daemon/event.c As an added bonus, it can now connect to any console device, not just the first one. * tools/Makefile.am: Link to event.c * tools/console.c, tools/console.h: Rewrite to use the virDomainOpenConsole() APIs with streams * tools/virsh.c: Support choosing the console name via --devname $NAME
-
- 11 11月, 2010 1 次提交
-
-
由 Eric Blake 提交于
* tools/virsh.c (vshParseArgv): Use NULL instead of 0 for pointer, and symbolic names for has_arg. Give --version an optional arg. (vshUsage): Document this. * tools/virsh.pod: Likewise.
-
- 10 11月, 2010 2 次提交
-
-
由 Laine Stump 提交于
These are in the newly added -V output.
-
由 Stefan Berger 提交于
Using automated replacement with sed and editing I have now replaced all occurrences of close() with VIR_(FORCE_)CLOSE() except for one, of course. Some replacements were straight forward, others I needed to pay attention. I hope I payed attention in all the right places... Please have a look. This should have at least solved one more double-close error.
-
- 09 11月, 2010 2 次提交
-
-
由 Jiri Denemark 提交于
This helps editors with detecting the temporary files as XML since the temporary files do not contain <?xml ...?> declaration. Requested by https://bugzilla.redhat.com/show_bug.cgi?id=602277
-
由 Daniel Veillard 提交于
To ease debugging this trivial patch allows to find what was compiled in in the local version of libvirt, this doesn't work for remote access but that's probably sufficient. With the patch I get on my machine: paphio:~/libvirt/tools -> ./virsh -V Virsh command line tool of libvirt 0.8.4 See web site at http://libvirt.org/ Compiled with support for: Hypervisors: Xen QEmu/KVM UML OpenVZ LXC ESX PHYP Test Networking: Remote Daemon Network Bridging Netcf Nwfilter Storage: Dir Disk Filesystem SCSI Multipath iSCSI LVM Miscellaneous: SELinux Secrets Debug Readline paphio:~/libvirt/tools -> * tools/virsh.c: add -V option * tools/virsh.pod: document the extension
-
- 08 11月, 2010 1 次提交
-
-
由 Justin Clift 提交于
-
- 06 11月, 2010 1 次提交
-
-
由 Chris Lalancette 提交于
Now that the virsh parsing has been revamped, we can implement qemu-monitor-command. This is basically the same as it was in previous iterations, but has now been tested to work both with the plain text monitor and the QMP monitor. Signed-off-by: NChris Lalancette <clalance@redhat.com>
-
- 29 10月, 2010 1 次提交
-
-
由 Justin Clift 提交于
Updated the descriptions for managedsave and start in virsh and the virsh man page, and also for managedsave-remove in the virsh man page.
-
- 27 10月, 2010 1 次提交
-
-
由 Eric Blake 提交于
* tools/virsh.c (opts_memtune): All other options in virsh use - for separating words.
-
- 26 10月, 2010 3 次提交
-
-
由 Eric Blake 提交于
* tools/virsh.c (cmdMemtune): Use long long for memory sizes. Simplify allocation, and plug memory leak.
-
由 Eric Blake 提交于
* tools/virsh.c (opts_freecell, opts_memtune, opts_vcpupin) (opts_setvcpus, opts_setmaxmem, opts_setmem) (opts_migrate_setmaxdowntime): Use VSH_OT_INT when only an integer is expected. (vshCmddefHelp, vshCmddefGetData): Allow mandatory VSH_OT_INT arguments.
-
由 Osier Yang 提交于
* tools/virsh.c: add missing option from the CLI to allows setting up the NIC model type when attaching an interface * tools/virsh.pod: extend documentation * AUTHORS: add Osier Yang to the list
-
- 21 10月, 2010 2 次提交
-
-
由 Matthias Bolte 提交于
Also exit early when nparams is 0.
-
由 Matthias Bolte 提交于
To get them under the common VIR_DOMAIN_MEMORY_* prefix.
-
- 20 10月, 2010 1 次提交
-
-
由 Eric Blake 提交于
* tools/virsh.c (cmdSetvcpus): Add new flags. Let invalid commands through to driver, to ease testing of hypervisor argument validation. (cmdMaxvcpus, cmdVcpucount): New commands. (commands): Add new commands. * tools/virsh.pod (setvcpus, vcpucount, maxvcpus): Document new behavior.
-
- 19 10月, 2010 1 次提交
-
-
由 Nikunj A. Dadhania 提交于
* tools/virsh.c: Add new memory tunable "min_guarantee", currently only ESX can use this * tools/virsh.pod: Update the manpage
-
- 16 10月, 2010 2 次提交
-
-
由 Eric Blake 提交于
* tools/virsh.c (cmdEcho): New command. (commands): Add it. * tools/virsh.pod (echo): Document it.
-
由 Eric Blake 提交于
* tools/virsh.c (vshCmdOptType): Add VSH_OT_ARGV. Delete unused VSH_OT_NONE. (vshCmddefGetData): Special case new opt flag. (vshCmddefHelp): Display help for argv. (vshCommandOptArgv): New function.
-
- 13 10月, 2010 13 次提交
-
-
由 Eric Blake 提交于
* tools/virsh.c: Update comments to match patch series.
-
由 Eric Blake 提交于
* tools/virsh.c (vshCommandParse): Float up, to avoid the need for a forward declaration.
-
由 Eric Blake 提交于
This makes 'virsh --conn test:///default help help' work right; previously, the abbreviation confused our hand-rolled option parsing. * tools/virsh.c (vshParseArgv): Use getopt_long feature, rather than (incorrectly) reparsing options ourselves.
-
由 Lai Jiangshan 提交于
"--" means no option at the following arguments. Signed-off-by: NLai Jiangshan <laijs@cn.fujitsu.com>
-
由 Lai Jiangshan 提交于
Some users may type command like this at the virsh shell: virsh # somecmd 'some arg' because they often use single quote in linux shell. Signed-off-by: NLai Jiangshan <laijs@cn.fujitsu.com>
-
由 Lai Jiangshan 提交于
add escaper \ for command string parsing, example: virsh # cd /path/which/have/a/double\"quote Signed-off-by: NLai Jiangshan <laijs@cn.fujitsu.com>
-
由 Lai Jiangshan 提交于
Old virsh command parsing mashes all the args back into a string and miss the quotes, this patches fix it. It is also needed for introducing qemu-monitor-command which is very useful. This patches uses the new vshCommandParser abstraction and adds vshCommandArgvParse() for arguments vector, so we don't need to mash arguments vector into a command sting. And the usage was changed: old: virsh [options] [commands] new: virsh [options]... [<command_string>] virsh [options]... <command> [args...] So we still support commands like: "define D.xml; dumpxml D" was parsed as a commands-string. and support commands like: we will not mash them into a string, we use new argv parser for it. But we don't support the command like: "define D.xml; dumpxml" was parsed as a command-name, but we have no such command-name. Signed-off-by: NLai Jiangshan <laijs@cn.fujitsu.com>
-
由 Lai Jiangshan 提交于
add vshCommandParser and make vshCommandParse() accept different parsers. the current code for parse command string is integrated as vshCommandStringParse(). Signed-off-by: NLai Jiangshan <laijs@cn.fujitsu.com>
-
由 Lai Jiangshan 提交于
in old code the following commands are equivalent: virsh # dumpxml --update-cpu=vm1 virsh # dumpxml --update-cpu vm1 because the old code split the option argument into 2 parts: --update-cpu=vm1 is split into update-cpu and vm1, and update-cpu is a boolean option, so the parser takes vm1 as another argument, very strange. after this patch applied, the first one will become illegal. To achieve this, we don't parse/check options when parsing command sting, but check options when parsing a command argument. And the argument is not split when parsing command sting. Signed-off-by: NLai Jiangshan <laijs@cn.fujitsu.com>
-
由 Lai Jiangshan 提交于
the following command is allowed at shell, we also make it allowed at virsh shell. Signed-off-by: NLai Jiangshan <laijs@cn.fujitsu.com>
-
由 Eric Blake 提交于
* tools/virsh.c (malloc, calloc, realloc, strdup): Enforce that within this file, we use the safe vsh wrappers instead. (cmdNodeListDevices, cmdSnapshotCreate, main): Fix violations of this policy.
-
由 Lai Jiangshan 提交于
In origin code, double quote is only allowed at the begin or end "complicated argument" --some_opt="complicated string" (we split this argument into 2 parts, option and data, the data is "complicated string"). This patch makes it allow double quote at any position of an argument: complicated" argument" complicated" "argument --"some opt=complicated string" This patch is also needed for the following patches, the following patches will not split option argument into 2 parts, so we have to allow double quote at any position of an argument. Signed-off-by: NLai Jiangshan <laijs@cn.fujitsu.com>
-
由 Nikunj A. Dadhania 提交于
The command helps to control the memory/swap parameters for the system, for eg. hard_limit (max memory the vm can use), soft_limit (limit during memory contention), swap_hard_limit(max swap the vm can use)
-
- 16 9月, 2010 1 次提交
-
-
由 Justin Clift 提交于
This is the simple fix Daniel Veillard suggested last year: http://www.redhat.com/archives/libvir-list/2009-May/msg00459.html
-
- 14 9月, 2010 1 次提交
-
-
由 Jiri Denemark 提交于
cmdAttachInterface and cmdAttachDisk still used vshRealloc and sprintf for generating XML, which is hardly maintainable. Let's get rid of this old code.
-