]> git.ipfire.org Git - thirdparty/libvirt.git/commit
util: Add virGettextInitialize, convert the code
authorCole Robinson <crobinso@redhat.com>
Tue, 12 Apr 2016 22:29:52 +0000 (18:29 -0400)
committerCole Robinson <crobinso@redhat.com>
Thu, 14 Apr 2016 17:22:40 +0000 (13:22 -0400)
commite7db22781071a39668276a395fb547c0dd90875d
treeae372b25b6764d67dad57fee5dfed11e5cf103b1
parent0f8be2531c44f04854af0b0569d3f2c373b1bba6
util: Add virGettextInitialize, convert the code

Take setlocale/gettext error handling pattern from tools/virsh-*
and use it for all standalone binaries via a new shared
virGettextInitialize routine. The virsh* pattern differed slightly
from other callers. All users now consistently:

* Ignore setlocale errors. virsh has done this forever, presumably for
  good reason. This has been partially responsible for some bug reports:

  https://bugzilla.redhat.com/show_bug.cgi?id=1312688
  https://bugzilla.redhat.com/show_bug.cgi?id=1026514
  https://bugzilla.redhat.com/show_bug.cgi?id=1016158

* Report the failed function name
* Report strerror
19 files changed:
cfg.mk
daemon/libvirtd.c
src/Makefile.am
src/libvirt_private.syms
src/locking/lock_daemon.c
src/locking/sanlock_helper.c
src/logging/log_daemon.c
src/lxc/lxc_controller.c
src/network/leaseshelper.c
src/security/virt-aa-helper.c
src/storage/parthelper.c
src/util/iohelper.c
src/util/virgettext.c [new file with mode: 0644]
src/util/virgettext.h [new file with mode: 0644]
tools/virsh.c
tools/virt-admin.c
tools/virt-host-validate.c
tools/virt-login-shell.c
tools/vsh.c