mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-02-23 00:00:02 +03:00
When bcachefs was a C program that had some functions implemented in Rust, it was necessary to make a static library containing the Rust functions available for the C program to link. Now that bcachefs is a Rust program, that library is no longer needed. Instead, the Rust executable links in libbachefs.a. This patch updates the crate structure to reflect that. The command functions are moved into their own module. There could be a need to create a "libbachefs-tools" library in the future that exposes an API for bcachefs functionality to other userspace programs. That will be a different, external API as opposed to the previous library functions which were an internal API for the bcachefs tool itself. Signed-off-by: Thomas Bertschinger <tahbertschinger@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> |
||
---|---|---|
.. | ||
bch_bindgen | ||
src | ||
.gitignore | ||
build.rs | ||
Cargo.lock | ||
Cargo.toml | ||
README.md | ||
rustfmt.toml |
Usage
bcachefs-mount 0.1.0
Mount a bcachefs filesystem by its UUID
USAGE:
bcachefs-mount [OPTIONS] <uuid> <mountpoint>
FLAGS:
-h, --help
Prints help information
-V, --version
Prints version information
OPTIONS:
-o <options>
Mount options [default: ]
-p, --password <password>
Where the password would be loaded from.
Possible values are: "fail" - don't ask for password, fail if filesystem is encrypted; "wait" - wait for
password to become available before mounting; "ask" - prompt the user for password; [default: fail]
ARGS:
<uuid>
External UUID of the bcachefs filesystem
<mountpoint>
Where the filesystem should be mounted
Caveats
--password ask
is not yet implemented, but you can use--password wait
, and load the key withbcachefs unlock
.
Build
$ git submodule update --init --recursive
$ cargo build --release
Binary will be built in target/release/bcachefs-mount
Dependencies:
- rust
- blkid
- uuid
- liburcu
- libsodium
- zlib
- liblz4
- libzstd
- libkeyutils