The function ba_decode_ifname() returns the number of characters written on success, and -1 on error.