aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErwan Velu <erwanaliasr1@gmail.com>2010-05-11 22:52:27 +0200
committerErwan Velu <erwanaliasr1@gmail.com>2010-05-11 22:52:27 +0200
commitaa1e064d872ea0b14bbbf67277b069b0a2f30d91 (patch)
tree59969fa32856fbea1c3ee2dbfff3baacdd063d02
parent59541d758a1dba33218f1869ea5762fef0e53ae2 (diff)
downloadsyslinux-aa1e064d872ea0b14bbbf67277b069b0a2f30d91.tar.gz
syslinux-aa1e064d872ea0b14bbbf67277b069b0a2f30d91.tar.xz
syslinux-aa1e064d872ea0b14bbbf67277b069b0a2f30d91.zip
VPD: Fixing base_address
This commit now save properly VPD's address.
-rw-r--r--com32/gplinclude/vpd/vpd.h2
-rw-r--r--com32/gpllib/vpd/vpd.c2
-rw-r--r--com32/hdt/hdt-cli-vpd.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/com32/gplinclude/vpd/vpd.h b/com32/gplinclude/vpd/vpd.h
index f1dcec68..bff77bd4 100644
--- a/com32/gplinclude/vpd/vpd.h
+++ b/com32/gplinclude/vpd/vpd.h
@@ -25,7 +25,7 @@ typedef struct {
char bios_release_date[9];
char default_flash_filename[13];
char bios_version[255];
- char base_address[6];
+ char base_address[16];
bool filled;
} s_vpd;
diff --git a/com32/gpllib/vpd/vpd.c b/com32/gpllib/vpd/vpd.c
index fd468e4c..6507f0d4 100644
--- a/com32/gpllib/vpd/vpd.c
+++ b/com32/gpllib/vpd/vpd.c
@@ -64,7 +64,7 @@ int vpd_decode(s_vpd * vpd)
for (q = p; q < p + 0x10000; q += 4) {
memcpy(buf, q, 5);
if (memcmp(buf, "\252\125VPD", 5) == 0) {
- snprintf(&vpd->base_address, 5, "%X", q);
+ snprintf(vpd->base_address, sizeof(vpd->base_address), "%p", q);
if (q[5] < 0x30)
return -ENOVPDTABLE;
diff --git a/com32/hdt/hdt-cli-vpd.c b/com32/hdt/hdt-cli-vpd.c
index 4974720b..c2f1c4ef 100644
--- a/com32/hdt/hdt-cli-vpd.c
+++ b/com32/hdt/hdt-cli-vpd.c
@@ -43,7 +43,7 @@ void main_show_vpd(int argc __unused, char **argv __unused,
return;
}
- more_printf("VPD present at address : 0x%s\n", hardware->vpd.base_address);
+ more_printf("VPD present at address : %s\n", hardware->vpd.base_address);
if (strlen(hardware->vpd.bios_build_id) > 0)
more_printf("Bios Build ID : %s\n",
hardware->vpd.bios_build_id);