From 4c70b84aba39167e7f4fbdcb129f1b121c7d0635 Mon Sep 17 00:00:00 2001 From: David Sterba Date: Tue, 2 Jul 2019 18:33:24 +0200 Subject: [PATCH] btrfs-progs: document the new all-in-one binary Signed-off-by: David Sterba --- Documentation/btrfs.asciidoc | 5 +++++ INSTALL | 17 +++++++++++++++++ README.md | 1 + 3 files changed, 23 insertions(+) diff --git a/Documentation/btrfs.asciidoc b/Documentation/btrfs.asciidoc index 6949b8fd..1625f6d8 100644 --- a/Documentation/btrfs.asciidoc +++ b/Documentation/btrfs.asciidoc @@ -126,6 +126,11 @@ source distribution. removed. *btrfs-zero-log*:: moved to *btrfs rescue zero-log*, standalone removed. +For space-constrained environments, it's possible to build a single binary with +functionality of several standalone tools. This is following the concept of +busybox where the file name selects the functionality. This works for symlinks +or hardlinks. The full list can be obtained by *btrfs help --box*. + EXIT STATUS ----------- *btrfs* returns a zero exit status if it succeeds. Non zero is returned in diff --git a/INSTALL b/INSTALL index 1cb01e87..ad6c4cc5 100644 --- a/INSTALL +++ b/INSTALL @@ -82,5 +82,22 @@ The resulting binaries have the '.static' suffix, the intermediate object files do not conflict with the normal (dynamic) build. +All-in-one binary (busybox style) +--------------------------------- + +Since version 5.2 it's possible to build a single binary that can act as other +standalone tools, based on the file name: + + $ make btrfs.box + $ mv btrfs.box btrfs + $ ln -s btrfs mkfs.btrfs + +The list of built-ins can be obtained by + + $ btrfs help --box + +The basic set will always contain: mkfs.btrfs, btrfs-image, btrfs-convert. + + References: * https://btrfs.wiki.kernel.org diff --git a/README.md b/README.md index c1e4fca0..b08a1520 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ This repository hosts following utilities: * **btrfs** — the main administration tool ([manual page](https://btrfs.wiki.kernel.org/index.php/Manpage/btrfs)) * **mkfs.btrfs** — utility to create the filesystem ([manual page](https://btrfs.wiki.kernel.org/index.php/Manpage/mkfs.btrfs)) +* all-in-one binary in the busybox style with mkfs.btrfs, btrfs-image and other tools built-in ([standalone tools](https://github.com/kdave/btrfs-progs/blob/master/Documentation/btrfs.asciidoc#standalone-tools)) The C and python 3 bindings are provided by a LGPL library **libbtrfsutil** see [libbtrfsutil/README.md](libbtrfsutil/README.md) for more.