]> xenbits.xensource.com Git - libvirt.git/commit
util: Introduce virFileRewriteStr
authorMichal Privoznik <mprivozn@redhat.com>
Mon, 28 Nov 2016 08:00:55 +0000 (09:00 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 6 Dec 2016 12:33:18 +0000 (13:33 +0100)
commitb9b664c5a8fda38f1f4e36bb878daa78ddac6382
treee4e081a87af9df5018cf25437423a8ba599071f6
parentb379c44c3506dda1c23a4de930c0c9509cb8c3a6
util: Introduce virFileRewriteStr

There are couple of places where we have a string and want to
save it to a file. Atomically. In all those places we use
virFileRewrite() but also implement the very same callback which
takes the string and write it into temp file. This makes no
sense. Unify the callbacks and move them to one place.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
src/conf/virsecretobj.c
src/libvirt_private.syms
src/network/leaseshelper.c
src/util/virfile.c
src/util/virfile.h
src/util/virxml.c