]> git.sur5r.net Git - u-boot/blobdiff - lib/vsprintf.c
tpm: report driver error code to upper layer
[u-boot] / lib / vsprintf.c
index 226f4eb3e5125878200fbeb1109d3ab24e41e260..8514f504988ea94119d8774c130ecdbfc5247e67 100644 (file)
@@ -300,8 +300,9 @@ static char *device_path_string(char *buf, char *end, void *dp, int field_width,
 {
        u16 *str;
 
+       /* If dp == NULL output the string '<NULL>' */
        if (!dp)
-               return "<NULL>";
+               return string16(buf, end, dp, field_width, precision, flags);
 
        str = efi_dp_str((struct efi_device_path *)dp);
        if (!str)
@@ -782,6 +783,7 @@ int sprintf(char *buf, const char *fmt, ...)
        return i;
 }
 
+#if CONFIG_IS_ENABLED(PRINTF)
 int printf(const char *fmt, ...)
 {
        va_list args;
@@ -823,15 +825,7 @@ int vprintf(const char *fmt, va_list args)
        puts(printbuffer);
        return i;
 }
-
-
-void __assert_fail(const char *assertion, const char *file, unsigned line,
-                  const char *function)
-{
-       /* This will not return */
-       panic("%s:%u: %s: Assertion `%s' failed.", file, line, function,
-             assertion);
-}
+#endif
 
 char *simple_itoa(ulong i)
 {