diff options
author | Shao Miller <shao.miller@yrdsb.edu.on.ca> | 2010-06-28 02:40:12 -0400 |
---|---|---|
committer | Shao Miller <shao.miller@yrdsb.edu.on.ca> | 2010-07-10 01:03:06 -0400 |
commit | 6880951cdaadf554a7536859f1a001bed9fd9c34 (patch) | |
tree | ddb453adf58203d1814718ad5640d696ff0250aa /com32/modules | |
parent | 092b8884d54f6469dd401283d6fdc401a3481444 (diff) | |
download | syslinux-6880951cdaadf554a7536859f1a001bed9fd9c34.tar.gz |
chain.c32, libcom32: Move chs macros and chs typedef as disk_chs
Moving portions of chain.c32 into libcom32.
Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
Diffstat (limited to 'com32/modules')
-rw-r--r-- | com32/modules/chain.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/com32/modules/chain.c b/com32/modules/chain.c index 6bf8827e..f631d6e5 100644 --- a/com32/modules/chain.c +++ b/com32/modules/chain.c @@ -147,23 +147,12 @@ static inline void error(const char *msg) static struct disk_info diskinfo; -/* - * CHS (cylinder, head, sector) value extraction macros. - * Taken from WinVBlock. Does not expand to an lvalue -*/ -#define chs_head(chs) chs[0] -#define chs_sector(chs) (chs[1] & 0x3F) -#define chs_cyl_high(chs) (((uint16_t)(chs[1] & 0xC0)) << 2) -#define chs_cyl_low(chs) ((uint16_t)chs[2]) -#define chs_cylinder(chs) (chs_cyl_high(chs) | chs_cyl_low(chs)) -typedef uint8_t chs[3]; - /* A DOS partition table entry */ struct part_entry { uint8_t active_flag; /* 0x80 if "active" */ - chs start; + disk_chs start; uint8_t ostype; - chs end; + disk_chs end; uint32_t start_lba; uint32_t length; } __attribute__ ((packed)); |