diff options
| author | Jens Arnold <amiconn@rockbox.org> | 2005-07-02 10:50:42 +0000 |
|---|---|---|
| committer | Jens Arnold <amiconn@rockbox.org> | 2005-07-02 10:50:42 +0000 |
| commit | 8102f3da270ce5a442523a1738318493906bb86a (patch) | |
| tree | 84ead8106d88ff86ec8f1887c5e88d9d7be41a5d /apps/database.c | |
| parent | a077b9ef12c480ddd7845af5e7da6ffd22e8464d (diff) | |
| download | rockbox-8102f3da270ce5a442523a1738318493906bb86a.zip rockbox-8102f3da270ce5a442523a1738318493906bb86a.tar.gz rockbox-8102f3da270ce5a442523a1738318493906bb86a.tar.bz2 rockbox-8102f3da270ce5a442523a1738318493906bb86a.tar.xz | |
New option to enable/disable the runtime database. Moved the runtimedb init to a more appropriate place and added proper USB handling.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6984 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/database.c')
| -rw-r--r-- | apps/database.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/apps/database.c b/apps/database.c index bce1fb4..ad97b55 100644 --- a/apps/database.c +++ b/apps/database.c @@ -315,6 +315,9 @@ int rundb_init(void) #endif if(!tagdb_initialized) /* forget it.*/ return -1; + + if(!global_settings.runtimedb) /* user doesn't care */ + return -1; rundb_fd = open(ROCKBOX_DIR "/rockbox.rundb", O_CREAT|O_RDWR); if (rundb_fd < 0) { @@ -358,6 +361,13 @@ int rundb_init(void) #endif } +void rundb_shutdown(void) +{ + if (rundb_fd >= 0) + close(rundb_fd); + rundb_initialized = 0; +} + void writerundbheader(void) { lseek(rundb_fd,0,SEEK_SET); |