summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/formats/fs_vtech.h
diff options
context:
space:
mode:
author npwoods <npwoods@mess.org>2022-09-19 02:33:50 -0400
committer GitHub <noreply@github.com>2022-09-19 08:33:50 +0200
commit5499683a239d9328a7c54b08135f31e7903ec772 (patch)
treee439ca5174cec47008c571f9c2636a5d4da68d81 /src/lib/formats/fs_vtech.h
parente1e30896f5cc3fd736564a9dea25d255241f6777 (diff)
Changed fs::manager_t::enumerate_f() to simplify logic within file system drivers (#10106)
* Changed fs::manager_t::enumerate_f() to simplify logic within file system drivers enumerate_f() used to contain quite a bit of boilerplate logic to determine whether a particular floppy type should be added. This change attempts to move this logic outside the file system drivers to simplify the drivers. The riskiest part of this change is unformatted_image::enumerate_f(). I attempted to replicate the logic that was previously determining with unformatted image types to use, but the logic is tricky and it isn't clear to me that replicating the logic is the correct action - I may be cargo culting. * Fix to floppy_image_device::fs_enum::add_raw() * Updating FS_FAT to reflect this PR * On the advise of Sarayan, I moved the filtering to the fs::manager_t::fs_enum base class. This is actually a less intrusive change than what I originally had because it keeps the unformatted raw image handling closer to what we had previously. Some misgivings about these changes: 1. We now have fs::manager_t::fs_enum::add() being a thin call that invokes a protected method called fs::manager_t::fs_enum::add_format(). Better ideas for names are welcome. 2. It feels odd that we've removed the need to do filtering from the various FS modules, but the unformatted module has to ask the fs_enum() for its internal variables for filtering to perform the same logic. This seems to be the least worst option Feedback is welcome
Diffstat (limited to 'src/lib/formats/fs_vtech.h')
-rw-r--r--src/lib/formats/fs_vtech.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/formats/fs_vtech.h b/src/lib/formats/fs_vtech.h
index 360021708ac..efb591bcb12 100644
--- a/src/lib/formats/fs_vtech.h
+++ b/src/lib/formats/fs_vtech.h
@@ -19,7 +19,7 @@ public:
virtual const char *name() const override;
virtual const char *description() const override;
- virtual void enumerate_f(floppy_enumerator &fe, u32 form_factor, const std::vector<u32> &variants) const override;
+ virtual void enumerate_f(floppy_enumerator &fe) const override;
virtual std::unique_ptr<filesystem_t> mount(fsblk_t &blockdev) const override;
virtual bool can_format() const override;