summaryrefslogtreecommitdiff
path: root/com32/chain/utility.h
diff options
context:
space:
mode:
authorMichal Soltys <soltys@ziu.info>2010-09-28 19:57:28 +0200
committerMichal Soltys <soltys@ziu.info>2010-10-08 12:40:51 +0200
commit81f86009696b5c7eff76e1981e967367235c5f7c (patch)
tree9f7d86b09f75877da049c9fab6321b8547255cd0 /com32/chain/utility.h
parent71485af3c0b47409fbd721d83f20fb8fcac76e42 (diff)
downloadsyslinux-81f86009696b5c7eff76e1981e967367235c5f7c.tar.gz
com32/chain: utility's lba2chs update
This patch adds 3 modes of operation to lba2chs: l2c_cnul - strict cylinder mode, using at most the value returned by 13h/48h or 13h/08h l2c_cadd - allow using 1 cylinder more. Only if cylinders are less than 1024 and total drive's lba size is not on a cylinder boundary. l2c_max - allow using any cylinder number. Modes have effect only if CHS geometry (cbios) is valid. chain.c uses l2c_cadd. Signed-off-by: Michal Soltys <soltys@ziu.info>
Diffstat (limited to 'com32/chain/utility.h')
-rw-r--r--com32/chain/utility.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/com32/chain/utility.h b/com32/chain/utility.h
index 4f50e0ea..db55bc7d 100644
--- a/com32/chain/utility.h
+++ b/com32/chain/utility.h
@@ -13,10 +13,14 @@
#define bpbVNT 6
#define bpbV70 7
+#define l2c_cnul 0
+#define l2c_cadd 1
+#define l2c_cmax 2
+
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 lba2chs(const struct disk_info *di, uint64_t lba, uint32_t mode);
uint32_t get_file_lba(const char *filename);
int drvoff_detect(int type, unsigned int *off);
int bpb_detect(const uint8_t *bpb);