• Rob Herring's avatar
    util: Add xa{v}sprintf_append functions · a1eff70c
    Rob Herring authored
    Add variadic and va_list functions, xa{v}sprintf, which appends a
    formatted string to an existing string and re-allocate the string buffer
    if necessary. xasprintf becomes just a special case of xasprintf_append
    with a NULL starting string.
    
    Rather than looping to get a big enough buffer, simply the implementation
    by assuming we have a C99 compliant vsnprintf implementation to return the
    necessary size. A side effect is glibc 2.0 support is dropped which seems
    unnecessary.
    Signed-off-by: 's avatarRob Herring <robh@kernel.org>
    Signed-off-by: 's avatarDavid Gibson <david@gibson.dropbear.id.au>
    a1eff70c