mirror of
https://github.com/mhx/dwarfs.git
synced 2025-09-08 03:49:44 -04:00
feat: show total hardlink size in dump / JSON info
This commit is contained in:
parent
1f2f6b08b9
commit
361074ced2
@ -1180,6 +1180,9 @@ metadata_<LoggerPolicy>::info_as_json(fsinfo_options const& opts,
|
||||
info["uncompressed_metadata_size"] = fsinfo->uncompressed_metadata_size;
|
||||
}
|
||||
}
|
||||
if (auto ths = meta_.total_hardlink_size()) {
|
||||
info["total_hardlink_size"] = *ths;
|
||||
}
|
||||
|
||||
if (auto opt = meta_.options()) {
|
||||
nlohmann::json options;
|
||||
@ -1333,6 +1336,9 @@ void metadata_<LoggerPolicy>::dump(
|
||||
}
|
||||
os << size_with_unit(fsinfo->uncompressed_metadata_size) << "\n";
|
||||
}
|
||||
if (auto ths = meta_.total_hardlink_size()) {
|
||||
os << "total hardlink size: " << size_with_unit(*ths) << "\n";
|
||||
}
|
||||
if (auto opt = meta_.options()) {
|
||||
std::vector<std::string> options;
|
||||
parse_metadata_options(meta_, [&](auto const& name, bool value) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user