rbpaths: Add new special dir HOME_DIR for RaaA.

HOME_DIR is intended for not-so-advanced files which shall be user
visible, and thus not in /.rockbox. Therefore HOME_DIR is translated
to $HOME on RaaA, /sdcard on android, the internal memory on ypr0
and "/" on native targets.

ROCKBOX_DIR ("/.rockbox") already existed as special and is translated
to whatever the real rockbox dir is on the target (e.g. /sdcard/rockbox
on android), but it's not suitable for some files we generate
(e.g. battery-bench.txt).

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31430 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Thomas Martitz 2011-12-25 20:11:18 +00:00
parent 16784598ac
commit 20b662a946
8 changed files with 54 additions and 52 deletions

View file

@ -24,7 +24,7 @@
#define TESTBASEDIR "/__TEST__"
#define TESTBASEDIR HOME_DIR "/__TEST__"
#define TEST_FILE TESTBASEDIR "/test_disk.tmp"
#define FRND_SEED 0x78C3 /* arbirary */
@ -83,7 +83,7 @@ static bool log_init(void)
rb->lcd_clear_display();
rb->lcd_update();
rb->create_numbered_filename(logfilename, "/", "test_disk_log_", ".txt",
rb->create_numbered_filename(logfilename, HOME_DIR, "test_disk_log_", ".txt",
2 IF_CNFN_NUM_(, NULL));
log_fd = rb->open(logfilename, O_RDWR|O_CREAT|O_TRUNC, 0666);
return log_fd >= 0;