On 23 January 2014 09:23:18 ChenQi <qi.c...@windriver.com> wrote:

On 01/22/2014 06:18 PM, Bernhard Reutner-Fischer wrote:
> On 22 January 2014 11:08, ChenQi <qi.c...@windriver.com> wrote:
>> On 01/22/2014 06:00 PM, Bernhard Reutner-Fischer wrote:
>>> On 20 January 2014 09:35, ChenQi <qi.c...@windriver.com> wrote:
>>>> On 01/20/2014 04:06 PM, Bernhard Reutner-Fischer wrote:
>>>>> On 20 January 2014 03:23:02 Chen Qi <qi.c...@windriver.com> wrote:
>>>>>
>>>>>> The less command provided by busybox cannot interpret the control
>>>>>> character, resulting in obscure output of the journalctl command
>>>>>> in a systemd based image.
>>>>>
>>>>> Can you send me the input containing this control character, please?
>>>>>
>>>>> Perhaps we can do something sensible about it..
>>>>> TIA,
>>>>
>>>> For more details, please refer to
>>>> https://bugzilla.yoctoproject.org/show_bug.cgi?id=5723.
>>>> You can also add you comments there.
>>> Can you please try:
>>> http://marc.info/?l=busybox&m=139038437907397&w=2
>>> and let me know if this fixes your issue?
>>>
>>> thanks,
>>>
>>>
>> Hi,
>>
>> I cannot open the link.
>> Could you please send me your patches as attachment? I'll try them out
>> tomorrow and let you know the results.
> http://marc.info/?l=busybox&m=139038437907397&q=raw
> or, just for you:
> http://busybox.net/~aldot/tmp/0001-less-Add-R.patch
>
> thanks,

Hi Bernhard,

I just tried this patch out.

1) Test 1
Command: journalctl
Result: control characters not interpreted
Log:
Jan 23 07:35:49 qemux86 kernel: [[1;39mACPI: RSDP 000f1610 00014 (v00 BOCHS )[[
0m
Jan 23 07:35:49 qemux86 kernel: [[1;39mACPI: RSDT 0fffe450 00034 (v01 BOCHS  BX
PCRSDT 00000001 BXPC 00000001)[[0m
Jan 23 07:35:49 qemux86 kernel: [[1;39mACPI: FACP 0fffff80 00074 (v01 BOCHS  BX
PCFACP 00000001 BXPC 00000001)[[0m
Jan 23 07:35:49 qemux86 kernel: [[1;39mACPI: DSDT 0fffe490 01137 (v01 BXPC
BXDSDT 00000001 INTL 20120913)[[0m
Jan 23 07:35:49 qemux86 kernel: [[1;39mACPI: FACS 0fffff40 00040[[0m
Jan 23 07:35:49 qemux86 kernel: [[1;39mACPI: SSDT 0ffff700 00838 (v01 BOCHS  BX
PCSSDT 00000001 BXPC 00000001)[[0m
Jan 23 07:35:49 qemux86 kernel: [[1;39mACPI: APIC 0ffff610 00078 (v01 BOCHS  BX
PCAPIC 00000001 BXPC 00000001)[[0m
Jan 23 07:35:49 qemux86 kernel: [[1;39mACPI: HPET 0ffff5d0 00038 (v01 BOCHS  BX
PCHPET 00000001 BXPC 00000001)[[0m
Jan 23 07:35:49 qemux86 kernel: ACPI: Local APIC address 0xfee00000
Jan 23 07:35:49 qemux86 kernel: [[1;39m0MB HIGHMEM available.[[0m
Jan 23 07:35:49 qemux86 kernel: [[1;39m255MB LOWMEM available.[[0m

2) Test 2
Command: export SYSTEMD_PAGER="less -R"; journalctl
Result: control characters interpreted

I know the behavior of `less' command from busybox is different from that of the 'less' package. And we can't ask too much. But do you think it's possible to make 'journalctl' work correctly without setting SYSTEMD_PAGER to "less -R"? I'm wondering why busybox's 'less' doesn't use the '-R' behaviour as its default. If so, we would not need this '-R' option at all.

Apparently Denys does not like the idea of having -R in there at all but even if it gets in, defaulting to -R is not acceptable I think. We could, however, add parsing the LESS env var as the big less does. I guess that would add another 30-40 bytes to the 300-ish for the -R itself, though.
Plain -r was much smaller, but I dropped it due to paranoia, fwiw.

To some extent I do agree with Denys that journalctl should only print ANSI colors if it's stdout isatty.

Thanks,

Sent with AquaMail for Android
http://www.aqua-mail.com


_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to