Skip to content

Commit 440868b

Browse files
committed
refactor(dwarfsextract): use filesystem_v2_lite
1 parent 7978d31 commit 440868b

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

include/dwarfs/utility/filesystem_extractor.h

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class os_access;
4444

4545
namespace reader {
4646

47-
class filesystem_v2;
47+
class filesystem_v2_lite;
4848

4949
}
5050

@@ -77,15 +77,16 @@ class filesystem_extractor {
7777

7878
void close() { impl_->close(); }
7979

80-
bool extract(reader::filesystem_v2 const& fs,
80+
bool extract(reader::filesystem_v2_lite const& fs,
8181
filesystem_extractor_options const& opts =
8282
filesystem_extractor_options()) {
8383
return impl_->extract(fs, nullptr, opts);
8484
}
8585

86-
bool extract(reader::filesystem_v2 const& fs, glob_matcher const* matcher,
87-
filesystem_extractor_options const& opts =
88-
filesystem_extractor_options()) {
86+
bool
87+
extract(reader::filesystem_v2_lite const& fs, glob_matcher const* matcher,
88+
filesystem_extractor_options const& opts =
89+
filesystem_extractor_options()) {
8990
return impl_->extract(fs, matcher, opts);
9091
}
9192

@@ -99,7 +100,7 @@ class filesystem_extractor {
99100
virtual void open_disk(std::filesystem::path const& output) = 0;
100101
virtual void close() = 0;
101102
virtual bool
102-
extract(reader::filesystem_v2 const& fs, glob_matcher const* matcher,
103+
extract(reader::filesystem_v2_lite const& fs, glob_matcher const* matcher,
103104
filesystem_extractor_options const& opts) = 0;
104105
};
105106

src/utility/filesystem_extractor.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,9 @@ class filesystem_extractor_ final : public filesystem_extractor::impl {
198198
}
199199
}
200200

201-
bool extract(reader::filesystem_v2 const& fs, glob_matcher const* matcher,
202-
filesystem_extractor_options const& opts) override;
201+
bool
202+
extract(reader::filesystem_v2_lite const& fs, glob_matcher const* matcher,
203+
filesystem_extractor_options const& opts) override;
203204

204205
private:
205206
void closefd(int& fd) {
@@ -260,7 +261,7 @@ class filesystem_extractor_ final : public filesystem_extractor::impl {
260261

261262
template <typename LoggerPolicy>
262263
bool filesystem_extractor_<LoggerPolicy>::extract(
263-
reader::filesystem_v2 const& fs, glob_matcher const* matcher,
264+
reader::filesystem_v2_lite const& fs, glob_matcher const* matcher,
264265
filesystem_extractor_options const& opts) {
265266
DWARFS_CHECK(a_, "filesystem not opened");
266267

tools/src/dwarfsextract_main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ int dwarfsextract_main(int argc, sys_char** argv, iolayer const& iol) {
191191
std::shared_ptr<performance_monitor> perfmon = performance_monitor::create(
192192
perfmon_enabled, iol.file, perfmon_trace_file);
193193

194-
reader::filesystem_v2 fs(lgr, *iol.os, fs_image, fsopts, perfmon);
194+
reader::filesystem_v2_lite fs(lgr, *iol.os, fs_image, fsopts, perfmon);
195195
utility::filesystem_extractor fsx(lgr, *iol.os);
196196

197197
if (format.empty()) {

0 commit comments

Comments
 (0)