libsnapshot: Centralize UBLK capability detection logic
The logic for determining whether the system supports UBLK-based snapshots
was duplicated across libsnapshot and libsnapuserd which is redundant.
This change consolidates the logic into a new, single function `IsUblkEnabled()`
within `fs_mgr/libsnapshot/capabilities.cpp`.
To allow this common code to be shared, it has been placed in a `filegroup`.
The build definitions for `libsnapshot` and `libsnapuserd` now include this
filegroup in their sources, ensuring a single source of truth for this check.
Bug: 362683283
Test: m and vts_libsnapshot_test with and without ublk
Change-Id: I88a118202045900911fe9fcd7fed538bb4c0e07e
Signed-off-by:
Sandeep Dhavale <dhavale@google.com>
Loading
Please register or sign in to comment