Fix abort affecting Raspberry Pi B+ and Raspberry Pi 2
Detail: These two boards don't have functional card detect lines on their microSD slots, so follow a different code path from most other RISC OS platforms. There was an issue when you accessed an object (other than the root directory) for which it (if it was a directory) or any of its parent directories were not in the directory cache, and it is specified by reference to disc name rather than drive number, and where the disc is not currently in a drive (or it's in a drive but hasn't been mounted since it was inserted). The additional PollChange inserted by DiscOp with a specified boot block (as used to identify the disc format when scanning drives to see if the disc in each drive has changed) which was intended to support some ADFS floppy drives had the side-effect with SDFS-type card-detect-less change detection (which has to wait until at least one DiscOp has been issued before it can tell if the card has changed) that FileCore's disc and drive records became unlinked part-way through the FullLookup routine. In later subroutines, this meant we ended up misidentifying the controller to which the disc was attached, and because SDFS didn't (until recently) have any hard discs, the hard disc controller was uninitialised, resulting in a data abort. This is fixed by making WhatDisc check for whether the disc record it's about to return has been delinked from the drive record, and repeat the process if so. Also removed some dead code (an alternate entry to WhatDiscCommon) while I was at it. Admin: Tested on Raspberry Pi B+ and 2. Version 3.65. Tagged as 'FileCore-3_65'
Showing with 79 additions and 34 deletions