]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Create file in virFileWriteStr() if it doesn't exist
authorJean-Baptiste Rouault <jean-baptiste.rouault@diateam.net>
Fri, 3 Dec 2010 09:47:08 +0000 (10:47 +0100)
committerEric Blake <eblake@redhat.com>
Fri, 3 Dec 2010 15:08:22 +0000 (08:08 -0700)
commit966a1bfe22ebd32e7dcb8e7f8127c0a269e54700
treea379c230d228229fce3832b4648a5c4d4d4e6538
parent4fa617e6eb712ccd9e763ffd1fad7706fa4bd60f
Create file in virFileWriteStr() if it doesn't exist

This patch adds a mode_t parameter to virFileWriteStr().
If mode is different from 0, virFileWriteStr() will try
to create the file if it doesn't exist.

* src/util/util.h (virFileWriteStr): Alter signature.
* src/util/util.c (virFileWriteStr): Allow file creation.
* src/network/bridge_driver.c (networkEnableIpForwarding)
(networkDisableIPV6): Adjust clients.
* src/node_device/node_device_driver.c
(nodeDeviceVportCreateDelete): Likewise.
* src/util/cgroup.c (virCgroupSetValueStr): Likewise.
* src/util/pci.c (pciBindDeviceToStub, pciUnBindDeviceFromStub):
Likewise.
src/network/bridge_driver.c
src/node_device/node_device_driver.c
src/util/cgroup.c
src/util/pci.c
src/util/util.c
src/util/util.h