diff options
author | H. Peter Anvin <hpa@linux.intel.com> | 2010-06-22 14:39:50 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2010-06-22 14:39:50 -0700 |
commit | b9ed5908b7c9e0c8f2342fe1ebf091b277309d57 (patch) | |
tree | 1064832cdfdef50e95f76ad9129058e5dc3f5e53 /core | |
parent | ba335e1e763e050a78f73e4ec56179e6f8a55dc9 (diff) | |
download | syslinux-b9ed5908b7c9e0c8f2342fe1ebf091b277309d57.tar.gz |
pxe: correct the generation of the UUID string
The UUID string was generated incorrectly, starting over for each
component.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'core')
-rw-r--r-- | core/fs/pxe/pxe.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/core/fs/pxe/pxe.c b/core/fs/pxe/pxe.c index 26b6a01c..4154fd56 100644 --- a/core/fs/pxe/pxe.c +++ b/core/fs/pxe/pxe.c @@ -24,7 +24,6 @@ char dot_quad_buf[16]; static bool has_gpxe; static uint32_t gpxe_funcs; -static uint8_t uuid_dashes[] = {4, 2, 2, 2, 6, 0}; bool have_uuid = false; /* Common receive buffer */ @@ -1063,7 +1062,6 @@ static int pxe_load_config(void) char *config_file; char *last; char *p; - uint8_t *uuid_ptr; int tries = 8; get_prefix(); @@ -1081,11 +1079,13 @@ static int pxe_load_config(void) /* Try loading by UUID */ if (have_uuid) { - uuid_ptr = uuid_dashes; + static const uint8_t uuid_dashes[] = {4, 2, 2, 2, 6, 0}; + char *src = uuid; + const uint8_t *uuid_ptr = uuid_dashes; + p = config_file; while (*uuid_ptr) { - int len = *uuid_ptr; - char *src = uuid; + int len = *uuid_ptr; lchexbytes(p, src, len); p += len * 2; |