2017-08-03 7:27 GMT+02:00 Ngie Cooper <n...@freebsd.org>:
> Modified: head/sys/boot/arm/at91/libat91/printf.c
> ==============================================================================
> --- head/sys/boot/arm/at91/libat91/printf.c     Thu Aug  3 03:45:48 2017      
>   (r321968)
> +++ head/sys/boot/arm/at91/libat91/printf.c     Thu Aug  3 05:27:05 2017      
>   (r321969)
> @@ -20,12 +20,13 @@
>  #include <stdarg.h>
>  #include "lib.h"
>
> -void
> +int
>  printf(const char *fmt,...)
>  {
>         va_list ap;
>         const char *hex = "0123456789abcdef";
>         char buf[10];
> +       const char *fmt_orig = fmt;
>         char *s;
>         unsigned u;
>         int c;
> @@ -66,5 +67,5 @@ printf(const char *fmt,...)
>         }
>         va_end(ap);
>
> -       return;
> +       return (int)(fmt - fmt_orig);
>  }

This makes printf() return the number of characters from the format
processed, right? This is different from libc's printf(), which
returns the number of characters printed.

-- 
Ed Schouten <e...@nuxi.nl>
Nuxi, 's-Hertogenbosch, the Netherlands
KvK-nr.: 62051717
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to