1 |
|
/* |
2 |
|
* disk.cpp - Generic disk driver |
3 |
|
* |
4 |
< |
* Basilisk II (C) 1997-2001 Christian Bauer |
4 |
> |
* Basilisk II (C) 1997-2004 Christian Bauer |
5 |
|
* |
6 |
|
* This program is free software; you can redistribute it and/or modify |
7 |
|
* it under the terms of the GNU General Public License as published by |
26 |
|
* Technote FL 24: "Don't Look at ioPosOffset for Devices" |
27 |
|
*/ |
28 |
|
|
29 |
+ |
#include "sysdeps.h" |
30 |
+ |
|
31 |
|
#include <string.h> |
32 |
|
#include <vector> |
33 |
|
|
35 |
|
using std::vector; |
36 |
|
#endif |
37 |
|
|
36 |
– |
#include "sysdeps.h" |
38 |
|
#include "cpu_emulation.h" |
39 |
|
#include "main.h" |
40 |
|
#include "macos_util.h" |
135 |
|
|
136 |
|
// Partition map block found, Apple HFS partition? |
137 |
|
if (strcmp((char *)(map + 48), "Apple_HFS") == 0) { |
138 |
< |
info.start_byte = ntohl(((uint32 *)map)[2]) << 9; |
139 |
< |
info.num_blocks = ntohl(((uint32 *)map)[3]); |
138 |
> |
info.start_byte = (loff_t)((map[8] << 24) | (map[9] << 16) | (map[10] << 8) | map[11]) << 9; |
139 |
> |
info.num_blocks = (map[12] << 24) | (map[13] << 16) | (map[14] << 8) | map[15]; |
140 |
|
D(bug(" HFS partition found at %d, %d blocks\n", info.start_byte, info.num_blocks)); |
141 |
|
break; |
142 |
|
} |