Don't write ram flags to disk (causes internal error).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10297 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
8eba20aefe
commit
4f93b30192
1 changed files with 8 additions and 0 deletions
|
@ -460,6 +460,9 @@ static bool write_index(int masterfd, int idxid, struct index_entry *idx)
|
|||
memcpy(&hdr->indices[idxid], idx, sizeof(struct index_entry));
|
||||
#endif
|
||||
|
||||
/* We need to exclude all memory only flags when writing on disk. */
|
||||
idx->flag = idx->flag & ~(FLAG_DIRCACHE);
|
||||
|
||||
lseek(masterfd, idxid * sizeof(struct index_entry)
|
||||
+ sizeof(struct master_header), SEEK_SET);
|
||||
if (write(masterfd, idx, sizeof(struct index_entry)) !=
|
||||
|
@ -3104,7 +3107,12 @@ static void load_ramcache(void)
|
|||
stat.ramcache = load_tagcache();
|
||||
|
||||
if (!stat.ramcache)
|
||||
{
|
||||
/* If loading failed, it must indicate some problem with the db
|
||||
* so disable it entirely to prevent further issues. */
|
||||
stat.ready = false;
|
||||
hdr = NULL;
|
||||
}
|
||||
|
||||
cpu_boost(false);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue