move from bdev.c to lxclvm.{c,h}. All functions previously declared as static
become public.
Adapt Makefile.am to include lxclvm.{c,h}.
The function:
- mount_unknown_fs();
becomes public.
Rationale: It is already called from different places and will be called by lvm,
and rdb. Also, it is defined twice exactly the same way. Once in conf.c
and once in bdev.c. Let's avoid that.
Defining the same function twice in different places just asks for
trouble.
become public as they will be called for loop, lvm, and or rdb.
Move the definition of:
- DEFAULT_FS_SIZE
- DEFAULT_FSTYPE
from bdev.c to bdev.h to grant other modules access to it.
Remove:
- find_fstype_cb();
from conf.c. It is defined static in bdev.c
Put:
- #define __STDC_FORMAT_MACROS
and include:
- #include <inttypes.h>
in lxclvm.c so that the format specifier PRIu64 is available.
The structs:
- struct bdev; /* defined in bdev.h */
- struct bdev_specs; /* defined in lxccontainer.h */
- struct lxc_conf; /* defined conf.h */
are forward declared/put as incomplete types into lxclvm.h as the functions
associated with lvm need access to it.
Take the chance to restructure bdev.c:
- put bdev structs which have already been split out into separate
modules at the top
- put declarations of all static functions at the top (This includes
all functions associated with modules that have not yet already been
put into a separate module.)
Signed-off-by: Christian Brauner <christian.brauner@mailbox.org>