summaryrefslogtreecommitdiff
path: root/apps/tagcache.c
diff options
context:
space:
mode:
authorJonas Häggqvist <rasher@rasher.dk>2009-07-04 19:28:47 +0000
committerJonas Häggqvist <rasher@rasher.dk>2009-07-04 19:28:47 +0000
commit54929e8871aa672a92dadbc0ad693ffd497c541f (patch)
tree938c7743c007c36d58445e374f4a1bf184ba6d79 /apps/tagcache.c
parent5de08ea834e2fc146092a43eeb7fb508f6ae09db (diff)
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
Diffstat (limited to 'apps/tagcache.c')
-rw-r--r--apps/tagcache.c11
1 files changed, 11 insertions, 0 deletions
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 ;