diff options
author | Michal Soltys <soltys@ziu.info> | 2013-02-14 16:51:47 +0100 |
---|---|---|
committer | Michal Soltys <soltys@ziu.info> | 2013-02-14 16:54:09 +0100 |
commit | 69c09a88f6c46ff139cd5c0316d3eeae508e2b5c (patch) | |
tree | cf726e7cb5e704302a0d654b4c074a9f6039c147 | |
parent | 42621957a8bfbec78e7744d211f8f0a854bb8620 (diff) | |
download | syslinux-69c09a88f6c46ff139cd5c0316d3eeae508e2b5c.tar.gz |
com32/chain: fix potential problem with 'fs' option
It's possible, that fs_lba available through syslinux_derivative_info()
could be 0. So match the candidates including disk, instead of only
partitions.
Signed-off-by: Michal Soltys <soltys@ziu.info>
-rw-r--r-- | com32/chain/chain.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/com32/chain/chain.c b/com32/chain/chain.c index d59ab876..ae95d45c 100644 --- a/com32/chain/chain.c +++ b/com32/chain/chain.c @@ -346,10 +346,10 @@ int find_dp(struct part_iter **_iter) /* 'fs' => we should lookup the syslinux partition number and use it */ if (!strcmp(opt.drivename, "fs")) { - while (!pi_next(iter)) { + do { if (iter->abs_lba == fs_lba) break; - } + } while (!pi_next(iter)); /* broken part structure or other problems */ if (iter->status) { error("Can't find myself on the drive I booted from."); |