]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
lxc-create: make 'none' bdev type work again
authorSerge Hallyn <serge.hallyn@ubuntu.com>
Thu, 1 May 2014 16:33:05 +0000 (11:33 -0500)
committerStéphane Graber <stgraber@ubuntu.com>
Thu, 1 May 2014 17:54:16 +0000 (13:54 -0400)
This should address https://github.com/lxc/lxc/issues/199

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
doc/lxc-create.sgml.in
src/lxc/lxc_create.c

index 2cb6bb5fa548d8bf1e2b27f6ba1d3f4eeca23e1d..97354609e0e08e42e8a3b0216a0f9b0cee06f2c8 100644 (file)
@@ -126,13 +126,14 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
        </term>
        <listitem>
          <para>
-           'backingstore' is one of 'none', 'dir', 'lvm', 'loop', 'btrfs', or 'best'.  The
-           default is 'none', meaning that the container root filesystem
+           'backingstore' is one of 'dir', 'lvm', 'loop', 'btrfs', or 'best'.  The
+           default is 'dir', meaning that the container root filesystem
            will be a directory under <filename>@LXCPATH@/container/rootfs</filename>.
-           'dir' has the same meaning as 'none', but also allows the optional
+           This backing store type allows the optional
            <replaceable>--dir ROOTFS</replaceable> to be specified, meaning
            that the container rootfs should be placed under the specified path,
-           rather than the default.  If 'btrfs' is specified, then the
+           rather than the default.  (The 'none' backingstore type is an alias for
+           'dir'.)  If 'btrfs' is specified, then the
            target filesystem must be btrfs, and the container rootfs will be
            created as a new subvolume.  This allows snapshotted clones to be
            created, but also causes rsync --one-filesystem to treat it as a
index 6b595f986b156c0cd0b6e3e1f7a1f1d379ad5e01..caca056ef4ce28aa18bf038bb1e77a4a3d3cc335 100644 (file)
@@ -218,6 +218,9 @@ int main(int argc, char *argv[])
        if (!validate_bdev_args(&my_args))
                exit(1);
 
+       if (strcmp(my_args.bdevtype, "none") == 0)
+               my_args.bdevtype = "dir";
+
        if (geteuid()) {
                if (mkdir_p(my_args.lxcpath[0], 0755)) {
                        exit(1);