[coreboot-gerrit] Patch merged into coreboot/master: hexstrtobin: Add a library function to decode ASCII hex into binary

gerrit at coreboot.org gerrit at coreboot.org
Sat May 21 05:59:00 CEST 2016


the following patch was just integrated into master:
commit b9552841bf9d1f59e173d9eb082b6e31423e8496
Author: Duncan Laurie <dlaurie at chromium.org>
Date:   Mon May 9 10:58:03 2016 -0700

    hexstrtobin: Add a library function to decode ASCII hex into binary
    
    This function will turn a string of ASCII hex characters into an array
    of bytes.  It will ignore any non-ASCII-hex characters in the input
    string and decode up to len bytes of data from it.
    
    This can be used for turning MAC addresses or UUID strings into binary
    for storage or further processing.
    
    Sample usage:
      uint8_t buf[6];
      hexstrtobin("00:0e:c6:81:72:01", buf, sizeof(buf));
      acpigen_emit_stream(buf, sizeof(buf));
    
    Change-Id: I2de9bd28ae8c42cdca09eec11a3bba497a52988c
    Signed-off-by: Duncan Laurie <dlaurie at chromium.org>
    Reviewed-on: https://review.coreboot.org/14837
    Tested-by: build bot (Jenkins)
    Reviewed-by: Aaron Durbin <adurbin at chromium.org>


See https://review.coreboot.org/14837 for details.

-gerrit



More information about the coreboot-gerrit mailing list