ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/disk.cpp
(Generate patch)

Comparing BasiliskII/src/disk.cpp (file contents):
Revision 1.11 by cebix, 2001-07-14T20:01:18Z vs.
Revision 1.14 by cebix, 2002-02-07T16:10:55Z

# Line 1 | Line 1
1   /*
2   *  disk.cpp - Generic disk driver
3   *
4 < *  Basilisk II (C) 1997-2001 Christian Bauer
4 > *  Basilisk II (C) 1997-2002 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
# Line 26 | Line 26
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  
# Line 33 | Line 35
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"
# Line 134 | Line 135 | static void find_hfs_partition(disk_driv
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                  }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines