* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/*
- * Modifications copyright (c) 2012-2013 Roderick W. Smith
- *
+ * Modifications copyright (c) 2012-2014 Roderick W. Smith
+ *
* Modifications distributed under the terms of the GNU General Public
* License (GPL) version 3 (GPLv3), a copy of which must be distributed
* with this source code or binaries made from it.
UINT8 Buffer[SAMPLE_SIZE];
UINTN i;
MBR_PARTITION_INFO *MbrTable;
- BOOLEAN MbrTableFound;
+ BOOLEAN MbrTableFound = FALSE;
Volume->HasBootCode = FALSE;
Volume->OSIconName = NULL;
if (FindMem(Buffer, 512, "Press any key to restart", 24) >= 0)
Volume->HasBootCode = FALSE;
+ // dummy FAT boot sector (created by iPartition)
+ if ((FindMem(Buffer, 512, "Medienfehler", 12) >= 0) &&
+ (FindMem(Buffer, 512, "Neustart: Taste dr\x81" "ken", 22) >= 0))
+ Volume->HasBootCode = FALSE;
+
// check for MBR partition table
if (*((UINT16 *)(Buffer + 510)) == 0xaa55) {
- MbrTableFound = FALSE;
MbrTable = (MBR_PARTITION_INFO *)(Buffer + 446);
for (i = 0; i < 4; i++)
if (MbrTable[i].StartLBA && MbrTable[i].Size)
VOID SetVolumeBadgeIcon(REFIT_VOLUME *Volume)
{
if (Volume->VolBadgeImage == NULL) {
- Volume->VolBadgeImage = egLoadIconAnyType(Volume->RootDir, L"", L".VolumeBadge", 128);
+ Volume->VolBadgeImage = egLoadIconAnyType(Volume->RootDir, L"", L".VolumeBadge", GlobalConfig.IconSizes[ICON_SIZE_BADGE]);
}
if (Volume->VolBadgeImage == NULL) {
if (FoundName != NULL) {
TypeName = FSTypeName(Volume->FSType); // NOTE: Don't free TypeName; function returns constant
if (StrLen(TypeName) > 0)
- SPrint(FoundName, 255, L"%s volume", FSTypeName(Volume->FSType));
+ SPrint(FoundName, 255, L"%s volume", TypeName);
else
SPrint(FoundName, 255, L"unknown volume");
} // if allocated memory OK
// get custom volume icons if present
if (!Volume->VolIconImage)
- Volume->VolIconImage = egLoadIconAnyType(Volume->RootDir, L"", L".VolumeIcon", 128);
+ Volume->VolIconImage = egLoadIconAnyType(Volume->RootDir, L"", L".VolumeIcon", GlobalConfig.IconSizes[ICON_SIZE_BIG]);
} // ScanVolume()
static VOID ScanExtendedPartition(REFIT_VOLUME *WholeDiskVolume, MBR_PARTITION_INFO *MbrEntry)
if (!EFI_ERROR(Status)) {
// get the BlockIO protocol
- Status = refit_call3_wrapper(BS->HandleProtocol, WholeDiskHandle, &BlockIoProtocol, (VOID **) &Volume->WholeDiskBlockIO);
+ Status = refit_call3_wrapper(BS->HandleProtocol, WholeDiskHandle, &BlockIoProtocol,
+ (VOID **) &Volume->WholeDiskBlockIO);
if (EFI_ERROR(Status)) {
Volume->WholeDiskBlockIO = NULL;
CheckError(Status, L"from HandleProtocol");