aboutsummaryrefslogtreecommitdiffstats
path: root/com32/chain/utility.c
diff options
context:
space:
mode:
authorMichal Soltys <soltys@ziu.info>2011-03-08 20:18:50 +0100
committerMichal Soltys <soltys@ziu.info>2011-03-08 20:18:50 +0100
commitbd4667bdf971bac20bf5cf8837c16301509e5f21 (patch)
tree4c46e86a1a10113465d4eb44735e765f28de9ddf /com32/chain/utility.c
parente63b3ed60d172ab751300bcf9b620bee33e92451 (diff)
downloadsyslinux-bd4667bdf971bac20bf5cf8837c16301509e5f21.tar.gz
syslinux-bd4667bdf971bac20bf5cf8837c16301509e5f21.tar.xz
syslinux-bd4667bdf971bac20bf5cf8837c16301509e5f21.zip
com32/chain: always report detected BPB
Signed-off-by: Michal Soltys <soltys@ziu.info>
Diffstat (limited to 'com32/chain/utility.c')
-rw-r--r--com32/chain/utility.c25
1 files changed, 10 insertions, 15 deletions
diff --git a/com32/chain/utility.c b/com32/chain/utility.c
index b30042b5..f0bfd8fd 100644
--- a/com32/chain/utility.c
+++ b/com32/chain/utility.c
@@ -7,18 +7,16 @@
#include <syslinux/disk.h>
#include "utility.h"
-#ifdef DEBUG
static const char *bpbtypes[] = {
- [0] = "BPB unknown",
- [1] = "BPB v.2.0",
- [2] = "BPB v.3.0",
- [3] = "BPB v.3.2",
- [4] = "BPB v.3.4",
- [5] = "BPB v.4.0",
- [6] = "BPB v.NT+",
- [7] = "BPB v.7.0",
+ [0] = "unknown",
+ [1] = "2.0",
+ [2] = "3.0",
+ [3] = "3.2",
+ [4] = "3.4",
+ [5] = "4.0",
+ [6] = "8.0 (NT+)",
+ [7] = "7.0",
};
-#endif
void error(const char *msg)
{
@@ -148,7 +146,7 @@ int drvoff_detect(int type, unsigned int *off)
/*
* heuristics could certainly be improved
*/
-int bpb_detect(const uint8_t *sec)
+int bpb_detect(const uint8_t *sec, const char *tag)
{
int a, b, c, jmp = -1, rev = 0;
@@ -207,11 +205,8 @@ nocode:
}
out:
-#ifdef DEBUG
- printf("INFO: BPB detection: %s\n", bpbtypes[rev]);
-#endif
+ printf("BPB detection (%s): %s\n", tag, bpbtypes[rev]);
return rev;
}
-
/* vim: set ts=8 sts=4 sw=4 noet: */