diff --git a/po/POTFILES.in b/po/POTFILES.in index 14636d4b93..397453a1c9 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -222,9 +222,9 @@ @SRCDIR@src/storage/storage_backend_vstorage.c @SRCDIR@src/storage/storage_backend_zfs.c @SRCDIR@src/storage/storage_driver.c -@SRCDIR@src/storage/storage_file_fs.c -@SRCDIR@src/storage/storage_file_gluster.c @SRCDIR@src/storage/storage_util.c +@SRCDIR@src/storage_file/storage_file_backend_fs.c +@SRCDIR@src/storage_file/storage_file_backend_gluster.c @SRCDIR@src/test/test_driver.c @SRCDIR@src/util/iohelper.c @SRCDIR@src/util/viralloc.c diff --git a/src/meson.build b/src/meson.build index 7c478219d6..3aa9498b98 100644 --- a/src/meson.build +++ b/src/meson.build @@ -266,6 +266,7 @@ subdir('nwfilter') subdir('secret') subdir('security') subdir('storage') +subdir('storage_file') subdir('bhyve') subdir('esx') diff --git a/src/storage/meson.build b/src/storage/meson.build index b4cefe9a89..8537359e93 100644 --- a/src/storage/meson.build +++ b/src/storage/meson.build @@ -15,10 +15,6 @@ storage_backend_fs_sources = [ 'storage_backend_fs.c', ] -stoarge_file_fs_sources = [ - 'storage_file_fs.c', -] - storage_backend_disk_sources = [ 'storage_backend_disk.c', ] @@ -31,10 +27,6 @@ storage_backend_gluster_sources = [ 'storage_backend_gluster.c', ] -storage_file_gluster_sources = [ - 'storage_file_gluster.c', -] - storage_backend_iscsi_sources = [ 'storage_backend_iscsi.c', ] @@ -72,7 +64,6 @@ storage_backend_zfs_sources = [ ] storage_backend_install_dir = libdir / 'libvirt' / 'storage-backend' -storage_file_install_dir = libdir / 'libvirt' / 'storage-file' if conf.has('WITH_STORAGE') storage_driver_impl_lib = static_library( @@ -109,14 +100,6 @@ if conf.has('WITH_STORAGE') 'install_dir': storage_backend_install_dir, } - virt_modules += { - 'name': 'virt_storage_file_fs', - 'sources': [ - files(stoarge_file_fs_sources), - ], - 'install_dir': storage_file_install_dir, - } - virt_daemons += { 'name': 'virtstoraged', 'c_args': [ @@ -181,17 +164,6 @@ if conf.has('WITH_STORAGE_GLUSTER') ], 'install_dir': storage_backend_install_dir, } - - virt_modules += { - 'name': 'virt_storage_file_gluster', - 'sources': [ - files(storage_file_gluster_sources), - ], - 'deps': [ - glusterfs_dep, - ], - 'install_dir': storage_file_install_dir, - } endif if conf.has('WITH_STORAGE_ISCSI') @@ -303,3 +275,5 @@ if conf.has('WITH_STORAGE_ZFS') 'install_dir': storage_backend_install_dir, } endif + +storage_inc_dir = include_directories('.') diff --git a/src/storage_file/meson.build b/src/storage_file/meson.build new file mode 100644 index 0000000000..898b1bd4ed --- /dev/null +++ b/src/storage_file/meson.build @@ -0,0 +1,38 @@ +stoarge_file_fs_sources = [ + 'storage_file_backend_fs.c', +] + +storage_file_gluster_sources = [ + 'storage_file_backend_gluster.c', +] + +storage_file_install_dir = libdir / 'libvirt' / 'storage-file' + +if conf.has('WITH_STORAGE') + virt_modules += { + 'name': 'virt_storage_file_fs', + 'sources': [ + files(stoarge_file_fs_sources), + ], + 'include': [ + storage_inc_dir, + ], + 'install_dir': storage_file_install_dir, + } +endif + +if conf.has('WITH_STORAGE_GLUSTER') + virt_modules += { + 'name': 'virt_storage_file_gluster', + 'sources': [ + files(storage_file_gluster_sources), + ], + 'include': [ + storage_inc_dir, + ], + 'deps': [ + glusterfs_dep, + ], + 'install_dir': storage_file_install_dir, + } +endif diff --git a/src/storage/storage_file_fs.c b/src/storage_file/storage_file_backend_fs.c similarity index 98% rename from src/storage/storage_file_fs.c rename to src/storage_file/storage_file_backend_fs.c index 5a44ef8c2d..42e514e437 100644 --- a/src/storage/storage_file_fs.c +++ b/src/storage_file/storage_file_backend_fs.c @@ -1,5 +1,5 @@ /* - * storage_file_fs.c: storage file code for FS and directory handling + * storage_file_backend_fs.c: storage file code for FS and directory handling * * Copyright (C) 2007-2018 Red Hat, Inc. * @@ -25,7 +25,7 @@ #include #include "virerror.h" -#include "storage_file_fs.h" +#include "storage_file_backend_fs.h" #include "storage_util.h" #include "virstoragefilebackend.h" #include "vircommand.h" diff --git a/src/storage/storage_file_fs.h b/src/storage_file/storage_file_backend_fs.h similarity index 90% rename from src/storage/storage_file_fs.h rename to src/storage_file/storage_file_backend_fs.h index 86a625232d..330c6db383 100644 --- a/src/storage/storage_file_fs.h +++ b/src/storage_file/storage_file_backend_fs.h @@ -1,5 +1,5 @@ /* - * storage_file_fs.h: storage file code for FS and directory handling + * storage_file_backend_fs.h: storage file code for FS and directory handling * * Copyright (C) 2018 Red Hat, Inc. * diff --git a/src/storage/storage_file_gluster.c b/src/storage_file/storage_file_backend_gluster.c similarity index 98% rename from src/storage/storage_file_gluster.c rename to src/storage_file/storage_file_backend_gluster.c index 2560e10d37..e6ce8d4c92 100644 --- a/src/storage/storage_file_gluster.c +++ b/src/storage_file/storage_file_backend_gluster.c @@ -1,5 +1,5 @@ /* - * storage_file_gluster.c: storage file backend for Gluster handling + * storage_file_backend_gluster.c: storage file backend for Gluster handling * * Copyright (C) 2013-2018 Red Hat, Inc. * @@ -23,7 +23,7 @@ #include -#include "storage_file_gluster.h" +#include "storage_file_backend_gluster.h" #include "viralloc.h" #include "virerror.h" #include "virlog.h" diff --git a/src/storage/storage_file_gluster.h b/src/storage_file/storage_file_backend_gluster.h similarity index 91% rename from src/storage/storage_file_gluster.h rename to src/storage_file/storage_file_backend_gluster.h index 1feaf3a8b9..3849e69902 100644 --- a/src/storage/storage_file_gluster.h +++ b/src/storage_file/storage_file_backend_gluster.h @@ -1,5 +1,5 @@ /* - * storage_file_gluster.h: storage file backend for Gluster handling + * storage_file_backend_gluster.h: storage file backend for Gluster handling * * Copyright (C) 2018 Red Hat, Inc. *