<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rockbox/firmware/logf.c, branch wolf3d</title>
<subtitle>My Rockbox tree</subtitle>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/'/>
<entry>
<title>Implement a much more capable vuprintf()</title>
<updated>2017-11-21T10:00:27+00:00</updated>
<author>
<name>Michael Sevakis</name>
<email>jethead71@rockbox.org</email>
</author>
<published>2017-09-08T23:28:02+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=5c9688961ef9166cec5225db50d5f73691d8292d'/>
<id>5c9688961ef9166cec5225db50d5f73691d8292d</id>
<content type='text'>
New support as well as some buggy support fixed.

Still no floating point support if ever that would be desired.

Support (*):
* Flags: '-', '+', ' ', '#', '0'

* Width and precision: 'n', '.n', '*' and '.*'

* Length modifiers: 'hh', 'h', 'j', 'l', 'll', 't', 'z'

* Radix: 'c', 'd', 'i', 'n', 'o', 'p/P', 's', 'u', 'x/X'

(*) Provision exists to switch lesser-used stuff on or off or when
certain functionality isn't desired (bootloader?). The compulsory
radixes are everything but 'o', 'n', 'p/P' and 'x/X' with length
modifiers being optional. The default setup is 'l', 'z', 'c', 'd',
'p/P', 's', 'u', 'x/X'.

* Move fdprintf() to its own file. It was in a strange place.

* Make callers compatible and fix a couple snprintf() bugs while
at it.

Could smush it down in size but I'm gonna get over the binsize
neurosis and just the let optimizer do its thing.

Change-Id: Ibdc613a9b6775802c188b29b9dd46c568c94f7c3
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
New support as well as some buggy support fixed.

Still no floating point support if ever that would be desired.

Support (*):
* Flags: '-', '+', ' ', '#', '0'

* Width and precision: 'n', '.n', '*' and '.*'

* Length modifiers: 'hh', 'h', 'j', 'l', 'll', 't', 'z'

* Radix: 'c', 'd', 'i', 'n', 'o', 'p/P', 's', 'u', 'x/X'

(*) Provision exists to switch lesser-used stuff on or off or when
certain functionality isn't desired (bootloader?). The compulsory
radixes are everything but 'o', 'n', 'p/P' and 'x/X' with length
modifiers being optional. The default setup is 'l', 'z', 'c', 'd',
'p/P', 's', 'u', 'x/X'.

* Move fdprintf() to its own file. It was in a strange place.

* Make callers compatible and fix a couple snprintf() bugs while
at it.

Could smush it down in size but I'm gonna get over the binsize
neurosis and just the let optimizer do its thing.

Change-Id: Ibdc613a9b6775802c188b29b9dd46c568c94f7c3
</pre>
</div>
</content>
</entry>
<entry>
<title>Don't add new message to logf when we dump it to file</title>
<updated>2016-04-04T09:07:44+00:00</updated>
<author>
<name>Mihail Zenkov</name>
<email>mihail.zenkov@gmail.com</email>
</author>
<published>2016-03-31T11:33:11+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=e599810ffaa6412326f61d026fc598c721b3a01c'/>
<id>e599810ffaa6412326f61d026fc598c721b3a01c</id>
<content type='text'>
Fix log file corruption if we have new messages at dumping log to file. Comment
removed as it incorrect. We store all messages in direct order (last message at
end of file).

Change-Id: I4acfa8a0935cc41a889e08f6bc42974fefd1ade2
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix log file corruption if we have new messages at dumping log to file. Comment
removed as it incorrect. We store all messages in direct order (last message at
end of file).

Change-Id: I4acfa8a0935cc41a889e08f6bc42974fefd1ade2
</pre>
</div>
</content>
</entry>
<entry>
<title>Make a few local variables static</title>
<updated>2015-01-11T17:02:43+00:00</updated>
<author>
<name>Thomas Jarosch</name>
<email>tomj@simonv.com</email>
</author>
<published>2015-01-11T17:02:43+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=cfbd9cb22fc1499c3b2f8207d72dce4cb388e09f'/>
<id>cfbd9cb22fc1499c3b2f8207d72dce4cb388e09f</id>
<content type='text'>
Change-Id: Ieb77a7f2cdf765afa3121320d03c0478cd97eb0f
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: Ieb77a7f2cdf765afa3121320d03c0478cd97eb0f
</pre>
</div>
</content>
</entry>
<entry>
<title>Add missing va_end() call when the log is full</title>
<updated>2014-12-20T12:48:43+00:00</updated>
<author>
<name>Thomas Jarosch</name>
<email>tomj@simonv.com</email>
</author>
<published>2014-12-20T12:47:28+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=ef1497c3dfca2dacdf6f96d97009fe388f726f4b'/>
<id>ef1497c3dfca2dacdf6f96d97009fe388f726f4b</id>
<content type='text'>
No need to go out of memory, too ;)

cppcheck reported:
[rockbox/firmware/logf.c:338]: (error) va_list 'ap' was opened but not closed by va_end().

Change-Id: I00e4c04d7e3d5d1415aa5066487ce1d9209e53aa
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
No need to go out of memory, too ;)

cppcheck reported:
[rockbox/firmware/logf.c:338]: (error) va_list 'ap' was opened but not closed by va_end().

Change-Id: I00e4c04d7e3d5d1415aa5066487ce1d9209e53aa
</pre>
</div>
</content>
</entry>
<entry>
<title>events: Rework event subsystem (add_event, send_event) to be more versatile.</title>
<updated>2014-03-14T22:36:30+00:00</updated>
<author>
<name>Thomas Martitz</name>
<email>kugel@rockbox.org</email>
</author>
<published>2014-03-14T22:15:16+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=470989bd708d9a425dbbf2d83b8fcbd0a8d0f488'/>
<id>470989bd708d9a425dbbf2d83b8fcbd0a8d0f488</id>
<content type='text'>
add_event_ex is added that takes an extra user_data pointer. This pointer is
passed to the callback (add_event and add_event_ex have slightly different
callbacks types). All callbacks also get the event id passed. Events added
with add_event_ex must be removed with remove_event_ex because the user_data
pointer must match in addition to the callback pointer.

On the other add_event is simplified to omit the oneshort parameter which
was almost always false (still there with add_event_ex).

As a side effect the ata_idle_notify callbacks are changed as well, they
do not take a data parameter anymore which was always NULL anyway.

This commit also adds some documentation to events.h

Change-Id: I13e29a0f88ef908f175b376d83550f9e0231f772
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
add_event_ex is added that takes an extra user_data pointer. This pointer is
passed to the callback (add_event and add_event_ex have slightly different
callbacks types). All callbacks also get the event id passed. Events added
with add_event_ex must be removed with remove_event_ex because the user_data
pointer must match in addition to the callback pointer.

On the other add_event is simplified to omit the oneshort parameter which
was almost always false (still there with add_event_ex).

As a side effect the ata_idle_notify callbacks are changed as well, they
do not take a data parameter anymore which was always NULL anyway.

This commit also adds some documentation to events.h

Change-Id: I13e29a0f88ef908f175b376d83550f9e0231f772
</pre>
</div>
</content>
</entry>
<entry>
<title>Print `last logf lines on panic().</title>
<updated>2014-01-11T10:37:18+00:00</updated>
<author>
<name>Frank Gevaerts</name>
<email>frank@gevaerts.be</email>
</author>
<published>2014-01-05T21:20:26+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=25e50ed8f1361ef3295aeb298a3edf2214f5b3b3'/>
<id>25e50ed8f1361ef3295aeb298a3edf2214f5b3b3</id>
<content type='text'>
If logf is enabled, panic() will print the last lines. On small
screens this is more or less useless, but on large screens it
can be very useful for debugging.

Change-Id: I26dfc76e9ac4a2ddc2def8db1616a04f943dbba3
Reviewed-on: http://gerrit.rockbox.org/709
Reviewed-by: Thomas Martitz &lt;kugel@rockbox.org&gt;
Reviewed-by: Frank Gevaerts &lt;frank@gevaerts.be&gt;
Tested: Frank Gevaerts &lt;frank@gevaerts.be&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If logf is enabled, panic() will print the last lines. On small
screens this is more or less useless, but on large screens it
can be very useful for debugging.

Change-Id: I26dfc76e9ac4a2ddc2def8db1616a04f943dbba3
Reviewed-on: http://gerrit.rockbox.org/709
Reviewed-by: Thomas Martitz &lt;kugel@rockbox.org&gt;
Reviewed-by: Frank Gevaerts &lt;frank@gevaerts.be&gt;
Tested: Frank Gevaerts &lt;frank@gevaerts.be&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix logdisk</title>
<updated>2013-08-16T19:59:16+00:00</updated>
<author>
<name>Amaury Pouly</name>
<email>amaury.pouly@gmail.com</email>
</author>
<published>2013-08-16T19:55:09+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=c13f21a4d5c27c638c9f0dedf6d7b1f9bbb4d682'/>
<id>c13f21a4d5c27c638c9f0dedf6d7b1f9bbb4d682</id>
<content type='text'>
The code was broken in a subtle but crucial way: storage idle
callbacks are oneshot so after the first flush everything would
stay in the buffer forever and would never be written to the disk
thus resulting into many events being lost. This changed correctly
registers the idle callback each time the buffer is not empty.
Note that the idle storage code checks if a callback
has is in the queue already so we don't register twice.

Change-Id: Ifdf331d4b757e05b8a6902bf5926cbc7689f5109
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The code was broken in a subtle but crucial way: storage idle
callbacks are oneshot so after the first flush everything would
stay in the buffer forever and would never be written to the disk
thus resulting into many events being lost. This changed correctly
registers the idle callback each time the buffer is not empty.
Note that the idle storage code checks if a callback
has is in the queue already so we don't register twice.

Change-Id: Ifdf331d4b757e05b8a6902bf5926cbc7689f5109
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove copy/pasted preprocessor defines that shouldn't have been included.</title>
<updated>2012-08-06T23:20:47+00:00</updated>
<author>
<name>Michael Giacomelli</name>
<email>giac2000@hotmail.com</email>
</author>
<published>2012-08-06T23:18:20+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=633dd492831db37f4df98315425ee146b8cb312b'/>
<id>633dd492831db37f4df98315425ee146b8cb312b</id>
<content type='text'>
Also, add dummy defines for application targets so that ERRORF, etc
map to DEBUGF instead of a compile error and add a new line at the
end of logf.c.

Change-Id: Ie7c5bc3397a853af619e810defce6123114e7a51
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Also, add dummy defines for application targets so that ERRORF, etc
map to DEBUGF instead of a compile error and add a new line at the
end of logf.c.

Change-Id: Ie7c5bc3397a853af619e810defce6123114e7a51
</pre>
</div>
</content>
</entry>
<entry>
<title>Introduce logging to disk feature into rockbox.</title>
<updated>2012-08-06T22:53:46+00:00</updated>
<author>
<name>Michael Giacomelli</name>
<email>giac2000@hotmail.com</email>
</author>
<published>2012-07-04T01:45:29+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=d46b090771291c10127d0fb421ee3c9f1e8f69b1'/>
<id>d46b090771291c10127d0fb421ee3c9f1e8f69b1</id>
<content type='text'>
Logs information, errors, etc to disk using the register_storage_idle_func
mechanism to write to the disk when available.  Currently, this is disabled
in normal builds, but can be enabled by adding ROCKBOX_HAS_LOGDISKF to the
config file.  By default, it uses a 2KB buffer and drops text if the buffer
overflows.

The system includes a simple warning level mechanism that can be used to by
default exclude non-serious errors from logging on release builds.

Change-Id: I0a3d186a93625c7c93dae37b993a0d37e5a3a925
Reviewed-on: http://gerrit.rockbox.org/288
Reviewed-by: Jonathan Gordon &lt;rockbox@jdgordon.info&gt;
Tested-by: Michael Giacomelli &lt;mgiacomelli@gmail.com&gt;
Reviewed-by: Michael Giacomelli &lt;mgiacomelli@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Logs information, errors, etc to disk using the register_storage_idle_func
mechanism to write to the disk when available.  Currently, this is disabled
in normal builds, but can be enabled by adding ROCKBOX_HAS_LOGDISKF to the
config file.  By default, it uses a 2KB buffer and drops text if the buffer
overflows.

The system includes a simple warning level mechanism that can be used to by
default exclude non-serious errors from logging on release builds.

Change-Id: I0a3d186a93625c7c93dae37b993a0d37e5a3a925
Reviewed-on: http://gerrit.rockbox.org/288
Reviewed-by: Jonathan Gordon &lt;rockbox@jdgordon.info&gt;
Tested-by: Michael Giacomelli &lt;mgiacomelli@gmail.com&gt;
Reviewed-by: Michael Giacomelli &lt;mgiacomelli@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Make logf() output to serial optional</title>
<updated>2012-02-16T13:44:43+00:00</updated>
<author>
<name>Ralf Ertzinger</name>
<email>rockbox@camperquake.de</email>
</author>
<published>2011-09-09T10:28:36+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=d2f97da668836f5d825c9aaef0d58dea64fc4dd5'/>
<id>d2f97da668836f5d825c9aaef0d58dea64fc4dd5</id>
<content type='text'>
Only output logf() to the serial port if LOGF_SERIAL is defined
(in addition to HAVE_SERIAL). Add an option to advanced configure
to set this (defaults to off).

Change-Id: I13d0f5df391e5371f7797f46a3faaf7a6974b9e4
Reviewed-on: http://gerrit.rockbox.org/92
Reviewed-by: Björn Stenberg &lt;bjorn@haxx.se&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Only output logf() to the serial port if LOGF_SERIAL is defined
(in addition to HAVE_SERIAL). Add an option to advanced configure
to set this (defaults to off).

Change-Id: I13d0f5df391e5371f7797f46a3faaf7a6974b9e4
Reviewed-on: http://gerrit.rockbox.org/92
Reviewed-by: Björn Stenberg &lt;bjorn@haxx.se&gt;
</pre>
</div>
</content>
</entry>
</feed>
