From 54929e8871aa672a92dadbc0ad693ffd497c541f Mon Sep 17 00:00:00 2001 From: Jonas Häggqvist Date: Sat, 4 Jul 2009 19:28:47 +0000 Subject: Crude logging for the sim in database creation/updating - to aid in debugging git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21638 a1c6a512-1295-4272-9138-f99709370657 --- apps/tagcache.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'apps/tagcache.c') diff --git a/apps/tagcache.c b/apps/tagcache.c index 391d8c6f81..43babfa9a5 100644 --- a/apps/tagcache.c +++ b/apps/tagcache.c @@ -1675,6 +1675,17 @@ static void __attribute__ ((noinline)) add_tagcache(char *path, bool has_albumartist; bool has_grouping; +#ifdef SIMULATOR + /* Crude logging for the sim - to aid in debugging */ + int logfd = open(ROCKBOX_DIR "/database.log", + O_WRONLY | O_APPEND | O_CREAT); + if (logfd >= 0) { + write(logfd, path, strlen(path)); + write(logfd, "\n", 1); + close(logfd); + } +#endif + if (cachefd < 0) return ; -- cgit v1.2.3