summaryrefslogtreecommitdiff
path: root/apps/database.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/database.c')
-rw-r--r--apps/database.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/apps/database.c b/apps/database.c
index bce1fb44cd..ad97b55ee7 100644
--- a/apps/database.c
+++ b/apps/database.c
@@ -315,6 +315,9 @@ int rundb_init(void)
315#endif 315#endif
316 if(!tagdb_initialized) /* forget it.*/ 316 if(!tagdb_initialized) /* forget it.*/
317 return -1; 317 return -1;
318
319 if(!global_settings.runtimedb) /* user doesn't care */
320 return -1;
318 321
319 rundb_fd = open(ROCKBOX_DIR "/rockbox.rundb", O_CREAT|O_RDWR); 322 rundb_fd = open(ROCKBOX_DIR "/rockbox.rundb", O_CREAT|O_RDWR);
320 if (rundb_fd < 0) { 323 if (rundb_fd < 0) {
@@ -358,6 +361,13 @@ int rundb_init(void)
358#endif 361#endif
359} 362}
360 363
364void rundb_shutdown(void)
365{
366 if (rundb_fd >= 0)
367 close(rundb_fd);
368 rundb_initialized = 0;
369}
370
361void writerundbheader(void) 371void writerundbheader(void)
362{ 372{
363 lseek(rundb_fd,0,SEEK_SET); 373 lseek(rundb_fd,0,SEEK_SET);