forked from len0rd/rockbox
Android: Minor changes in ldebugf.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30304 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
4ed1340a7c
commit
c0a4c66f9d
1 changed files with 3 additions and 2 deletions
|
@ -26,6 +26,7 @@
|
||||||
#include <android/log.h>
|
#include <android/log.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
#define LOG_TAG "Rockbox"
|
#define LOG_TAG "Rockbox"
|
||||||
|
|
||||||
|
@ -42,10 +43,10 @@ void debugf(const char *fmt, ...)
|
||||||
void ldebugf(const char* file, int line, const char *fmt, ...)
|
void ldebugf(const char* file, int line, const char *fmt, ...)
|
||||||
{
|
{
|
||||||
va_list ap;
|
va_list ap;
|
||||||
char buf[1024];
|
char buf[strlen(fmt) + 8];
|
||||||
snprintf(buf, sizeof(buf), "%s:%d %s", file, line, fmt);
|
snprintf(buf, sizeof(buf), "%s:%d %s", file, line, fmt);
|
||||||
va_start(ap, fmt);
|
va_start(ap, fmt);
|
||||||
__android_log_vprint(ANDROID_LOG_DEBUG, LOG_TAG " L", buf, ap);
|
__android_log_vprint(ANDROID_LOG_DEBUG, LOG_TAG, buf, ap);
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue