[syslinux:master] pxe: correct the generation of the UUID string

syslinux-bot for H. Peter Anvin hpa at linux.intel.com
Tue Jun 22 14:42:03 PDT 2010


Commit-ID:  b9ed5908b7c9e0c8f2342fe1ebf091b277309d57
Gitweb:     http://syslinux.zytor.com/commit/b9ed5908b7c9e0c8f2342fe1ebf091b277309d57
Author:     H. Peter Anvin <hpa at linux.intel.com>
AuthorDate: Tue, 22 Jun 2010 14:39:50 -0700
Committer:  H. Peter Anvin <hpa at linux.intel.com>
CommitDate: Tue, 22 Jun 2010 14:39:50 -0700

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 at linux.intel.com>


---
 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 26b6a01..4154fd5 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;



More information about the Syslinux-commits mailing list