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
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
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 <kugel@rockbox.org>
Reviewed-by: Frank Gevaerts <frank@gevaerts.be>
Tested: Frank Gevaerts <frank@gevaerts.be>
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
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
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 <rockbox@jdgordon.info>
Tested-by: Michael Giacomelli <mgiacomelli@gmail.com>
Reviewed-by: Michael Giacomelli <mgiacomelli@gmail.com>
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 <bjorn@haxx.se>
The simulator defines PLATFORM_HOSTED, as RaaA will do (RaaA will not define SIMULATOR).
The new define is to (de-)select code to compile on hosted platforms generally.
Should be no functional change to targets or the simulator.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27019 a1c6a512-1295-4272-9138-f99709370657
Each line (of MAX_LOGF_ENTRY characters) would be marked with
LOGF_TERMINATE_CONTINUE_LINE, but still be padded with a '\0'
This also reverts r22250 which worked around the problem in logfdump()
Flyspray: FS#10513
Author: Amaury Pouly
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22253 a1c6a512-1295-4272-9138-f99709370657
* Move strncpy() from core to the pluginlib
* Introduce strlcpy() and use that instead in most places (use memcpy in a few) in core and some plugins
* Drop strncpy() from the codec api as no codec used it
* Bump codec and plugin api versions
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21863 a1c6a512-1295-4272-9138-f99709370657
Also enable HID, and use that as the dummy class instead of charging-only for controllers that have working interrupt transfers.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21053 a1c6a512-1295-4272-9138-f99709370657
NOTE to WPS people....
%m has been removed, but (i think) because of the other %m tags it wont fail if you try loading a wps with %m|..|, it will just be ignored.
Also note that if the statusbar is enabled the default viewport is 8 pixels shorter than when its not, i.e (0,0) is really (0,8) if the statusbar is shown... I dont think this will be a major issue because almost no WPS show the bar and use bitmaps... text only WPS shouldnt be affected.
Please report problem screens in http://forums.rockbox.org/index.php?topic=17358.0
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17763 a1c6a512-1295-4272-9138-f99709370657
Rockbox tagcache database engine. Only host endian support at the
moment and no command line parameters. Mainly for developers for
debugging at the moment.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11497 a1c6a512-1295-4272-9138-f99709370657
21 as that is what fits in an iriver LCD by default since the font is 6 pixels
wide.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6547 a1c6a512-1295-4272-9138-f99709370657