]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commit
build: use re-entrant functions in virsh
authorEric Blake <eblake@redhat.com>
Tue, 4 Sep 2012 23:35:27 +0000 (17:35 -0600)
committerEric Blake <eblake@redhat.com>
Wed, 5 Sep 2012 17:09:04 +0000 (11:09 -0600)
commit44342a0efe650499d935f3868df73174ff2e7b8b
tree197020e13bc3c8444bbacff0452f1a987cfbdd7d
parent8386b304b0f16db4e88ddf1eca50b84a465eff80
build: use re-entrant functions in virsh

Yesterday's commit 15d2c9f pointed out that virsh was still using
localtime(), which is not thread-safe, even though virsh is
definitely multi-threaded.  Even if we only ever triggered it from
one thread, it's better safe than sorry for maintenance purposes.

* cfg.mk (exclude_file_name_regexp--sc_prohibit_nonreentrant):
Tighten the rule.
* tools/virsh.c (vshOutputLogFile): Avoid localtime.
(vshEditWriteToTempFile, vshEditReadBackFile, cmdCd, cmdPwd)
(vshCloseLogFile): Avoid strerror.
* tools/console.c (vshMakeStdinRaw): Likewise.
* tools/virsh-domain.c (vshGenFileName): Fix spacing in previous
patch.
cfg.mk
tools/console.c
tools/virsh-domain.c
tools/virsh.c