diff options
author | H. Peter Anvin <hpa@zytor.com> | 2007-06-08 15:25:27 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2007-06-08 15:25:27 -0700 |
commit | 16d1a84d79dbccd361397182725bff7516ac65d6 (patch) | |
tree | 8795d564ad7e0cdc7e8219897c254e56cd7ee7e7 | |
parent | d2d09fa4786f2ccee80d6e7abb19b615325cfa36 (diff) | |
download | syslinux-16d1a84d79dbccd361397182725bff7516ac65d6.tar.gz |
Lower case seems to be more common for UUID
From a brief look around the Internet, it seems UUID is more commonly
written in lower case (still with the funny dash pattern, though.) Stick
with that convention.
Also, unify upper-vs-lower-case hexadecimal string production.
-rw-r--r-- | pxelinux.asm | 37 | ||||
-rw-r--r-- | pxelinux.doc | 8 |
2 files changed, 23 insertions, 22 deletions
diff --git a/pxelinux.asm b/pxelinux.asm index 1ac0a709..8003f895 100644 --- a/pxelinux.asm +++ b/pxelinux.asm @@ -600,21 +600,15 @@ make_bootif_string: movzx cx,byte [MACLen] mov si,MACType inc cx - mov bx,hextbl_lower .hexify_mac: - lodsb - mov ah,al - shr al,4 - xlatb - stosb - mov al,ah - and al,0Fh - xlatb - stosb + push cx + mov cl,1 ; CH == 0 already + call lchexbytes mov al,'-' stosb + pop cx loop .hexify_mac - mov [di-1],byte 0 ; Null-terminate and strip final colon + mov [di-1],cl ; Null-terminate and strip final dash ; ; Generate ip= option ; @@ -765,7 +759,7 @@ config_scan: movzx cx,byte [bx] jcxz .done_uuid inc bx - call uchexbytes + call lchexbytes mov al,'-' stosb jmp .gen_uuid @@ -1990,9 +1984,10 @@ gendotquad: pop eax ret ; -; uchexbytes +; uchexbytes/lchexbytes ; -; Take a number of bytes in memory and convert to upper-case hexadecimal +; Take a number of bytes in memory and convert to upper/lower-case +; hexadecimal ; ; Input: ; DS:SI = input bytes @@ -2003,9 +1998,15 @@ gendotquad: ; ES:DI = first byte after ; CX = 0 ; -; Trashes AX +; Trashes AX, DX ; + +lchexbytes: + mov dl,'a'-'9'-1 + jmp xchexbytes uchexbytes: + mov dl,'A'-'9'-1 +xchexbytes: .loop: lodsb mov ah,al @@ -2020,8 +2021,9 @@ uchexbytes: add al,'0' cmp al,'9' jna .done - add al,'A'-'9'-1 -.done: stosb + add al,dl +.done: + stosb ret ; @@ -2447,7 +2449,6 @@ writestr equ cwritestr section .data -hextbl_lower db '0123456789abcdef' copyright_str db ' Copyright (C) 1994-', year, ' H. Peter Anvin' db CR, LF, 0 boot_prompt db 'boot: ', 0 diff --git a/pxelinux.doc b/pxelinux.doc index 082613ba..23ab8622 100644 --- a/pxelinux.doc +++ b/pxelinux.doc @@ -43,8 +43,8 @@ search for its config file on the boot server in the following way: First, it will search for the config file using the client UUID, if one is provided by the PXE stack (note, some BIOSes don't have a valid UUID, and you might end up with something like all 1's.) This is - in the standard UUID format using hexadecimal upper digits, e.g. - B8945908-D6A6-41A9-611D-74A6AB80B83D. + in the standard UUID format using lower case hexadecimal digits, e.g. + b8945908-d6a6-41a9-611d-74a6ab80b83d. Next, it will search for the config file using the hardware type (using its ARP type code) and address, all in lower case hexadecimal @@ -62,11 +62,11 @@ search for its config file on the boot server in the following way: (in lower case). As an example, if the boot file name is /mybootdir/pxelinux.0, the - UUID is B8945908-D6A6-41A9-611D-74A6AB80B83D, the Ethernet MAC + UUID is b8945908-d6a6-41a9-611d-74a6ab80b83d, the Ethernet MAC address is 88:99:AA:BB:CC:DD and the IP address 192.0.2.91, it will try: - /mybootdir/pxelinux.cfg/B8945908-D6A6-41A9-611D-74A6AB80B83D + /mybootdir/pxelinux.cfg/b8945908-d6a6-41a9-611d-74a6ab80b83d /mybootdir/pxelinux.cfg/01-88-99-aa-bb-cc-dd /mybootdir/pxelinux.cfg/C000025B /mybootdir/pxelinux.cfg/C000025 |