]> git.ipfire.org Git - thirdparty/libvirt.git/commit
storage: fs: Fix pool building when directory already exists
authorChristophe Fergeau <cfergeau@redhat.com>
Fri, 17 Jul 2015 08:02:20 +0000 (10:02 +0200)
committerChristophe Fergeau <cfergeau@redhat.com>
Fri, 17 Jul 2015 13:35:41 +0000 (15:35 +0200)
commit45e32f2ea5d839e5ce2c6e9de013dab67a17f7f4
treec8cc8c51be16060fe1387bd633aca4ebcf9c68a0
parent02b9226ee3847b8d60f9feb231537d01193c66ce
storage: fs: Fix pool building when directory already exists

Currently, when trying to virsh pool-define/virsh pool-build a new
'dir' pool, if the target directory already exists, virsh
pool-build/virStoragePoolBuild will error out. This is a change of
behaviour compared to eg libvirt 1.2.13

This is caused by the wrong type being used for the dir_create_flags
variable in virStorageBackendFileSystemBuild , it's defined as a bool
but is used as a flag bit field so should be unsigned int (this matches
the type virDirCreate expects for this variable).

This should fix https://bugzilla.gnome.org/show_bug.cgi?id=752417 (GNOME
Boxes) and https://bugzilla.redhat.com/show_bug.cgi?id=1244080
(downstream virt-manager).
src/storage/storage_backend_fs.c