]>
git.proxmox.com Git - mirror_lxc.git/commit
Split bdev into modules: lxczfs
The functions:
- zfs_clone();
- zfs_clonepaths();
- zfs_create();
- zfs_destroy();
- zfs_detect();
- zfs_list_entry();
- zfs_mount();
- zfs_umount();
move from bdev.c to lxczfs.{c,h}. All functions previously declared as static
become public.
Adapt Makefile.am to include lxczfs.{c,h}.
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 lxczfs.h as the functions
associated with zfs need access to it.
Minor changes:
- Use exit(EXIT_FAILURE) instead of exit(1).
- Use brackets around else {} if the if {} did:
I.e. instead of:
if {
// do one;
// do two;
} else
// do three;
use:
if {
// do one;
// do two;
} else {
// do three;
}
- Instead of declaring char pointers and arrays on the same line, i.e.:
char arr[len], *p;
do:
char arr[len];
char *p;
which makes intentions a lot clearer.
- Since we require c99 anyway, use finer-grained scoping by declaring
variables where they are needed instead of simply at the top.
Signed-off-by: Christian Brauner <christian.brauner@mailbox.org>