From 0d591b9348e43cf59cd4857dcc0e9029566d96e5 Mon Sep 17 00:00:00 2001 From: Michal Soltys Date: Sat, 28 Aug 2010 01:06:13 +0200 Subject: chain module: setbpb changes, bss & bs options, bugfixes Generic function detecting BPB type (7 versions) have been added. set{hid,geo,drv} have been replaced by single setbpb option, using mentioned function to make more precise decisions what to update where. Full BSS and BS emulation has been added, also employing BPB detection. Some logic/flow changes in chain's main(). There was also a bug, in which backup sector was populated with wrong data. Appropriate documentation updates. Signed-off-by: Michal Soltys --- com32/chain/utility.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'com32/chain/utility.h') diff --git a/com32/chain/utility.h b/com32/chain/utility.h index b77f633b..0cdb36f2 100644 --- a/com32/chain/utility.h +++ b/com32/chain/utility.h @@ -4,11 +4,21 @@ #include #include +#define bpbV20 1 +#define bpbV30 2 +#define bpbV32 3 +#define bpbV34 4 +#define bpbV40 5 +#define bpbVNT 6 +#define bpbV70 7 + void error(const char *msg); int guid_is0(const struct guid *guid); void wait_key(void); uint32_t lba2chs(const struct disk_info *di, uint64_t lba); uint32_t get_file_lba(const char *filename); +int drvoff_detect(int type, unsigned int *off); +int bpb_detect(const uint8_t *bpb); #endif -- cgit v1.2.1