From d4ce5b911628423adeb53db8a3cb796f8de2016d Mon Sep 17 00:00:00 2001 From: Michal Soltys Date: Thu, 14 Feb 2013 16:51:46 +0100 Subject: com32/chain: implement handling of non-standard hybrid GPT+MBR layouts We also take a bit relaxed approach - so we check for presence of 0xEE at any place, then attempt to read GPT header only if prefmbr is not set. Signed-off-by: Michal Soltys --- com32/chain/mangle.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'com32/chain/mangle.c') diff --git a/com32/chain/mangle.c b/com32/chain/mangle.c index 252128da..94e6e90f 100644 --- a/com32/chain/mangle.c +++ b/com32/chain/mangle.c @@ -537,7 +537,7 @@ int manglepe_hide(struct part_iter *miter) if (miter->index > 4 && !(opt.hide & HIDE_EXT)) warn("Specified partition is logical, so it can't be unhidden without 'unhideall'."); - if (!(iter = pi_begin(&miter->di, PIF_STEPALL | opt.relax))) + if (!(iter = pi_begin(&miter->di, PIF_STEPALL | opt.relax | opt.prefmbr))) return -1; while (!pi_next(iter) && !werr) { @@ -611,7 +611,7 @@ int manglepe_fixchs(struct part_iter *miter) return -1; } - if (!(iter = pi_begin(&miter->di, PIF_STEPALL | opt.relax))) + if (!(iter = pi_begin(&miter->di, PIF_STEPALL | opt.relax | opt.prefmbr))) return -1; while (!pi_next(iter) && !werr) { -- cgit v1.2.1