This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: PR ld/12288: No newline at the end of diagnostic messages


On Mon, Dec 6, 2010 at 1:01 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Mon, Dec 6, 2010 at 12:27 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
>> On Sun, Dec 5, 2010 at 6:30 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
>>> On Sun, Dec 5, 2010 at 5:00 PM, H.J. Lu <hongjiu.lu@intel.com> wrote:
>>>> Hi,
>>>>
>>>> The plugin diagnostic text doesn't have the trailing `\n'. ?I checked in
>>>> this patch to add the trailing `\n' similar to gold.
>>>>
>>>>
>>>> H.J.
>>>> ---
>>>> diff --git a/ld/ChangeLog b/ld/ChangeLog
>>>> index bb7b5a6..4aed58c 100644
>>>> --- a/ld/ChangeLog
>>>> +++ b/ld/ChangeLog
>>>> @@ -1,5 +1,10 @@
>>>> ?2010-12-05 ?H.J. Lu ?<hongjiu.lu@intel.com>
>>>>
>>>> + ? ? ? PR ld/12288
>>>> + ? ? ? * plugin.c (message): Add the trailing `\n'.
>>>> +
>>>> +2010-12-05 ?H.J. Lu ?<hongjiu.lu@intel.com>
>>>> +
>>>> ? ? ? ?* ldfile.c (ldfile_open_file_search): Check maybe_archive instead
>>>> ? ? ? ?of is_archive.
>>>> ? ? ? ?* emultempl/aix.em: Likewise.
>>>
>>> I checked in this patch to add a space after `:' in plugin error message.
>>>
>>>
>>> H.J.
>>> --
>>> diff --git a/ld/ChangeLog b/ld/ChangeLog
>>> index eeefd33..63858ee 100644
>>> --- a/ld/ChangeLog
>>> +++ b/ld/ChangeLog
>>> @@ -1,5 +1,9 @@
>>> ?2010-12-05 ?H.J. Lu ?<hongjiu.lu@intel.com>
>>>
>>> + ? ? ? * plugin.c (message): Add a space after `:' in error message.
>>> +
>>> +2010-12-05 ?H.J. Lu ?<hongjiu.lu@intel.com>
>>> +
>>
>> I checked in this as obvious fix.
>>
>> Thanks.
>>
>> --
>> H.J.
>> --
>> diff --git a/bfd/ChangeLog b/bfd/ChangeLog
>> index 16f5536..009a020 100644
>> --- a/bfd/ChangeLog
>> +++ b/bfd/ChangeLog
>> @@ -1,3 +1,8 @@
>> +2010-12-06 ?Dmitry Gorbachev ?<d.g.gorbachev@gmail.com>
>> +
>> + ? ? ? PR ld/12288
>> + ? ? ? * plugin.c (message): Add putchar for the trailing `\n'.
>> +
>> ?2010-12-04 ?Mike Frysinger ?<vapier@gentoo.org>
>>
>> ? ? ? ?* Makefile.am (!INSTALL_LIBBFD/bfdinclude_HEADERS): Set to nothing.
>> diff --git a/bfd/plugin.c b/bfd/plugin.c
>> index a46bf90..61cd687 100644
>> --- a/bfd/plugin.c
>> +++ b/bfd/plugin.c
>> @@ -78,6 +78,7 @@ message (int level ATTRIBUTE_UNUSED,
>> ? va_start (args, format);
>> ? printf ("bfd plugin: ");
>> ? vprintf (format, args);
>> + ?putchar ('\n');
>> ? va_end (args);
>> ? return LDPS_OK;
>> ?}
>> diff --git a/ld/ChangeLog b/ld/ChangeLog
>> index 3d20061..e4140e6 100644
>> --- a/ld/ChangeLog
>> +++ b/ld/ChangeLog
>> @@ -1,3 +1,8 @@
>> +2010-12-06 ?Dmitry Gorbachev ?<d.g.gorbachev@gmail.com>
>> +
>> + ? ? ? PR ld/12288
>> + ? ? ? * plugin.c (message): Use putchar for the trailing `\n'.
>> +
>> ?2010-12-06 ?H.J. Lu ?<hongjiu.lu@intel.com>
>> ? ? ? ? ? ?Dmitry Gorbachev ?<d.g.gorbachev@gmail.com>
>>
>> diff --git a/ld/plugin.c b/ld/plugin.c
>> index 2950295..db31596 100644
>> --- a/ld/plugin.c
>> +++ b/ld/plugin.c
>> @@ -598,7 +598,7 @@ message (int level, const char *format, ...)
>> ? ? ? break;
>> ? ? }
>>
>> - ?fputc('\n', stderr);
>> + ?putchar('\n');
>>
>> ? va_end (args);
>> ? return LDPS_OK;
>>
>
> Needs to update testplug.c. ?Checked in.
>
> --
> H.J.
> --
> 2010-12-06 ?H.J. Lu ?<hongjiu.lu@intel.com>
>
> ? ? ? ?PR ld/12288
> ? ? ? ?* testplug.c: Remove the trailing `\n' from TV_MESSAGE.
>

LDPL_ERROR isn't fatal and has `\n' for stderr.  We
shouldn't add `\n' for stdout.  Checked in.

-- 
H.J.
---
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 19f4c62..16a134a 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,6 +1,12 @@
 2010-12-06  H.J. Lu  <hongjiu.lu@intel.com>

 	PR ld/12288
+	* plugin.c (message): Don't add the trailing `\n' for
+	LDPL_ERROR.
+
+2010-12-06  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/12288
 	* testplug.c: Remove the trailing `\n' from TV_MESSAGE.

 2010-12-06  Dmitry Gorbachev  <d.g.gorbachev@gmail.com>
diff --git a/ld/plugin.c b/ld/plugin.c
index db31596..e4943c2 100644
--- a/ld/plugin.c
+++ b/ld/plugin.c
@@ -582,9 +582,11 @@ message (int level, const char *format, ...)
     {
     case LDPL_INFO:
       vfinfo (stdout, format, args, FALSE);
+      putchar ('\n');
       break;
     case LDPL_WARNING:
       vfinfo (stdout, format, args, TRUE);
+      putchar ('\n');
       break;
     case LDPL_FATAL:
     case LDPL_ERROR:
@@ -598,8 +600,6 @@ message (int level, const char *format, ...)
       break;
     }

-  putchar('\n');
-
   va_end (args);
   return LDPS_OK;
 }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]