mirror of
https://github.com/davidgiven/fluxengine.git
synced 2025-10-31 11:17:01 -07:00
Volume metadata for FFS.
This commit is contained in:
@@ -56,6 +56,22 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
std::map<std::string, std::string> getMetadata()
|
||||
{
|
||||
AdfMount m(this);
|
||||
auto* vol = m.mount();
|
||||
|
||||
std::map<std::string, std::string> attributes;
|
||||
attributes[VOLUME_NAME] = vol->volName;
|
||||
|
||||
int total = vol->lastBlock - vol->firstBlock + 1;
|
||||
attributes[TOTAL_BLOCKS] = fmt::format("{}", total);
|
||||
attributes[USED_BLOCKS] =
|
||||
fmt::format("{}", total - adfCountFreeBlocks(vol));
|
||||
attributes[BLOCK_SIZE] = "512";
|
||||
return attributes;
|
||||
}
|
||||
|
||||
void create(bool quick, const std::string& volumeName)
|
||||
{
|
||||
if (!quick)
|
||||
|
||||
Reference in New Issue
Block a user