#define chs_cyl_low(chs) ((winvblock__uint16) chs[2])
#define chs_cylinder(chs) (chs_cyl_high(chs) | chs_cyl_low(chs))
+/* An MBR. */
#ifdef _MSC_VER
# pragma pack(1)
#endif
-
-/* An MBR. */
-winvblock__def_struct (mbr) {
+struct WVL_DISK_MBR {
winvblock__uint8 code[440];
winvblock__uint32 disk_sig;
winvblock__uint16 pad;
} partition[4] __attribute__((packed));
winvblock__uint16 mbr_sig;
} __attribute__((__packed__));
-
+typedef struct WVL_DISK_MBR WVL_S_DISK_MBR, * WVL_SP_DISK_MBR;
#ifdef _MSC_VER
# pragma pack()
#endif
IN OUT WV_SP_DISK_T disk_ptr
) {
winvblock__uint16 heads = 0, sects_per_track = 0, cylinders;
- mbr_ptr as_mbr;
+ WVL_SP_DISK_MBR as_mbr;
if ((boot_sect_ptr == NULL) || (disk_ptr == NULL))
return;
* If we couldn't parse a FAT superblock, try checking MBR params.
* Logic derived from syslinux/memdisk/setup.c by H. Peter Anvin.
*/
- as_mbr = (mbr_ptr) boot_sect_ptr;
+ as_mbr = (WVL_SP_DISK_MBR) boot_sect_ptr;
if (
(heads == 0 ) &&
(sects_per_track == 0) &&