Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 Aug 2017 05:45:13 -0700
From:      "Ngie Cooper (yaneurabeya)" <yaneurabeya@gmail.com>
To:        Ed Schouten <ed@nuxi.nl>
Cc:        Ngie Cooper <ngie@freebsd.org>, src-committers <src-committers@freebsd.org>, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r321969 - in head/sys/boot: arm/at91/libat91 arm/ixp425/boot2 i386/boot2
Message-ID:  <18B68C5B-DFB6-4871-9E56-AFACD0D3CBCE@gmail.com>
In-Reply-To: <CABh_MKnXdD32h1nTq=GSpdrxxrSmQzyZ8=np9z4EGqzH65Tqzw@mail.gmail.com>
References:  <201708030527.v735R5dg041043@repo.freebsd.org> <CABh_MKnXdD32h1nTq=GSpdrxxrSmQzyZ8=np9z4EGqzH65Tqzw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--Apple-Mail=_08D14944-C06A-484C-A555-04B8B077EACF
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=utf-8


> On Aug 3, 2017, at 04:48, Ed Schouten <ed@nuxi.nl> wrote:
>=20
> 2017-08-03 7:27 GMT+02:00 Ngie Cooper <ngie@freebsd.org>:
>> Modified: head/sys/boot/arm/at91/libat91/printf.c
>> =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
>> --- 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"
>>=20
>> -void
>> +int
>> printf(const char *fmt,...)
>> {
>>        va_list ap;
>>        const char *hex =3D "0123456789abcdef";
>>        char buf[10];
>> +       const char *fmt_orig =3D fmt;
>>        char *s;
>>        unsigned u;
>>        int c;
>> @@ -66,5 +67,5 @@ printf(const char *fmt,...)
>>        }
>>        va_end(ap);
>>=20
>> -       return;
>> +       return (int)(fmt - fmt_orig);
>> }
>=20
> 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.

	Yes. markj identified flaws with my approach that need to be =
addressed in another commit (unfortunately I didn=E2=80=99t pay close =
enough attention to the details when I implemented the change).
Thanks,
-Ngie


--Apple-Mail=_08D14944-C06A-484C-A555-04B8B077EACF
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename=signature.asc
Content-Type: application/pgp-signature;
	name=signature.asc
Content-Description: Message signed with OpenPGP using GPGMail

-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - https://gpgtools.org

iQIcBAEBCgAGBQJZgxrZAAoJEPWDqSZpMIYVQFMQAIQ0UKMtX8Q6Wkc06aqqb7ky
kbm3ofOiuxjJ/BtAzaWF3l9wZptLhc7B+8ZrM4XO4781g9oHVw0Z0oY/ncPv86AA
OgnK7ASMgb/8hby2KIMhdADRB8v8ciUhsNoIv8hX5pMjU+FwyPNoLI86JvLwZNS4
Zn5F51HDKRm09Kz0djepBVkQgFcpWnsyHF4V7LRvgX2n/3E/X5qyayxvAa63naPA
YF7tO4wV4UuVU3LSKF5yQgNDx98u9dmmxn20IyWAGjSD127Uf302NmZazhQqAd93
wFxBpOgeRVgKcRsBMzYmCaynIncz+xPwHDeAchu9MjVP3I7vh0wmEbpo5Ht7YC1c
bH21uy+9OaSc4sYm1oZlRzUcs8owKMdSuKXoXmdOSZWwtlAxE+4gkSxkqUQIIi+O
T5WVXENQjWR9FOpVPZZLMjvwb5XbeTdMcV4FtCZRUE/R6WhLkDTr8PJHYFGmDoxC
FL13wrz/XtvfC66hqtuvJhKNJwOqhJjJSbeKRnwX2IuXAIUaQHCJkGEBddEfSuZH
PimJM4p7XUbStdjyboSeECPnlX4JE+QDbJPaC1M6hLcazvPm5WIS6Roy2ovBBV/2
bIEqgo/PWDrZiOlBDMambe8MRId5bSVzIfQpz6o2IKZ2tyQNOjNzBY8R8+KcDQIM
tinvf2OijcLFGh2abbhf
=WCIN
-----END PGP SIGNATURE-----

--Apple-Mail=_08D14944-C06A-484C-A555-04B8B077EACF--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?18B68C5B-DFB6-4871-9E56-AFACD0D3CBCE>