]> git.proxmox.com Git - mirror_lxc.git/commit
Split bdev into modules: lxcnbd
authorChristian Brauner <christian.brauner@mailbox.org>
Wed, 30 Dec 2015 16:02:54 +0000 (17:02 +0100)
committerChristian Brauner <christian.brauner@mailbox.org>
Tue, 12 Jan 2016 07:50:45 +0000 (08:50 +0100)
commitbf76c012b3f0e49930d207fe77ba6cc3919728ac
treee4f28487af47ea691dde0424da2d8f2df2ca9106
parent3ceb28207202e17191a0cf195a971ccaa6c7e5d1
Split bdev into modules: lxcnbd

The functions

- clone_attach_nbd();
- do_attach_nbd();
- nbd_busy();
- nbd_detach();
- nbd_get_partition();
- wait_for_partition();

move from bdev.c to lxcnbd.c. They remain static

The functions

- attach_nbd();
- detach_nbd_idx();
- nbd_clonepaths();
- nbd_create();
- nbd_destroy();
- nbd_detect();
- nbd_mount();
- nbd_umount();
- requires_nbd();

move from bdev.c to lxcnbd.{c,h}. They all become extern.

The struct

- struct nbd_attach_data

moves from bdev.c to lxcnbd.c.

Adapt Makefile.am to include lxcnbd.{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 lxcnbd.h as the functions
associated with nbd need access to it.

Signed-off-by: Christian Brauner <christian.brauner@mailbox.org>
src/lxc/Makefile.am
src/lxc/bdev/bdev.c
src/lxc/bdev/bdev.h
src/lxc/bdev/lxcnbd.c [new file with mode: 0644]
src/lxc/bdev/lxcnbd.h [new file with mode: 0644]