fs_mgr: device mapper: Add libdm and 'dmctl' tool to use it.
libdm is small static library that is intended to be the one source to
control device mapper. It is intended to have APIs to create, control
and destroy device mapper targets. Eventually, all fs_mgr implementation
that talks to device mapper will be moved to using libdm APIs.
Added 'dmctl', a command line tool that lists the registered device
mapper targets and their corresponding version. The tool will continue
to get new features to exemplify new APIs implemented in libdm.
The library is intentionally static and folds into libfs_mgr. All
clients must link to libfs_mgr as a result.
Test: dmctl list
Bug: 110035986
Change-Id: I71e7146073a74e7523524bf3b20d0be6d06f9fad
Signed-off-by: Sandeep Patil <sspatil@google.com>
diff --git a/fs_mgr/Android.bp b/fs_mgr/Android.bp
index bc3b04b..923442f 100644
--- a/fs_mgr/Android.bp
+++ b/fs_mgr/Android.bp
@@ -56,12 +56,15 @@
"libselinux",
"libavb",
"libfstab",
+ "libdm",
],
export_static_lib_headers: [
"libfstab",
+ "libdm",
],
whole_static_libs: [
"liblogwrap",
+ "libdm",
"libfstab",
],
cppflags: [