mirror of
https://github.com/davidgiven/fluxengine.git
synced 2025-10-31 11:17:01 -07:00
Actually start using the new physical sector stuff.
This commit is contained in:
@@ -63,7 +63,7 @@ public:
|
||||
{
|
||||
unsigned track = trackid.first;
|
||||
unsigned side = trackid.second;
|
||||
auto trackLayout = Layout::getLayoutOfTrack(track, side);
|
||||
auto& trackLayout = Layout::getLayoutOfTrack(track, side);
|
||||
locations.insert(Mapper::computeLocationFor(track, side));
|
||||
|
||||
/* If we don't have all the sectors of this track, we may need to
|
||||
@@ -131,7 +131,7 @@ private:
|
||||
auto trackdata = readAndDecodeTrack(*_fluxSource, *_decoder, location);
|
||||
|
||||
for (const auto& sector : trackdata->sectors)
|
||||
*_loadedSectors.put(track, side, sector->physicalSector) = *sector;
|
||||
*_loadedSectors.put(track, side, sector->logicalSector) = *sector;
|
||||
_loadedTracks.insert(trackid_t(track, side));
|
||||
}
|
||||
|
||||
|
||||
@@ -164,7 +164,7 @@ Filesystem::Filesystem(std::shared_ptr<SectorInterface> sectors):
|
||||
int track = p.first;
|
||||
int side = p.second;
|
||||
|
||||
auto trackLayout = Layout::getLayoutOfTrack(track, side);
|
||||
auto& trackLayout = Layout::getLayoutOfTrack(track, side);
|
||||
if (trackLayout.logicalSectors.empty())
|
||||
Error() << "FS: filesystem support cannot be used without concrete "
|
||||
"layout information";
|
||||
@@ -268,7 +268,7 @@ Bytes Filesystem::getLogicalSector(uint32_t number, uint32_t count)
|
||||
int track = std::get<0>(it);
|
||||
int side = std::get<1>(it);
|
||||
int sector = std::get<2>(it);
|
||||
auto trackLayout = Layout::getLayoutOfTrack(track, side);
|
||||
auto& trackLayout = Layout::getLayoutOfTrack(track, side);
|
||||
bw += _sectors->get(track, side, sector)
|
||||
->data.slice(0, trackLayout.sectorSize);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user