summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2014-02-18 07:11:11 +0100
committerThomas Martitz <kugel@rockbox.org>2014-02-23 20:23:51 +0100
commit706e6b7a75339cadc7b8a856a2eace68f89bb168 (patch)
treea2333677f20154021d6a1df80c4ff5899a1ff7cb
parent3f116769fded08d8fe4d08d4b1de4a7ba4738390 (diff)
downloadrockbox-706e6b7a75339cadc7b8a856a2eace68f89bb168.tar.gz
rockbox-706e6b7a75339cadc7b8a856a2eace68f89bb168.zip
Move VOL_NAMES definition to mv.h
Fits better and including dir.h is more messy for some places. Change-Id: I3ec30dcc1ac2734ad3844c903238b6cc2f4e134c
-rwxr-xr-xapps/playlist.c2
-rw-r--r--apps/root_menu.c2
-rw-r--r--firmware/export/mv.h17
-rw-r--r--firmware/include/dir.h17
4 files changed, 16 insertions, 22 deletions
diff --git a/apps/playlist.c b/apps/playlist.c
index 3d930cf3f9..9c895bfd67 100755
--- a/apps/playlist.c
+++ b/apps/playlist.c
@@ -75,7 +75,7 @@
75#include "ata_idle_notify.h" 75#include "ata_idle_notify.h"
76#include "file.h" 76#include "file.h"
77#include "action.h" 77#include "action.h"
78#include "dir.h" 78#include "mv.h"
79#include "debug.h" 79#include "debug.h"
80#include "audio.h" 80#include "audio.h"
81#include "lcd.h" 81#include "lcd.h"
diff --git a/apps/root_menu.c b/apps/root_menu.c
index f83a97b9ed..259d9bf69c 100644
--- a/apps/root_menu.c
+++ b/apps/root_menu.c
@@ -41,7 +41,7 @@
41 41
42#ifdef HAVE_HOTSWAP 42#ifdef HAVE_HOTSWAP
43#include "storage.h" 43#include "storage.h"
44#include "dir.h" 44#include "mv.h"
45#endif 45#endif
46/* gui api */ 46/* gui api */
47#include "list.h" 47#include "list.h"
diff --git a/firmware/export/mv.h b/firmware/export/mv.h
index b1c8a83008..0d98ed1211 100644
--- a/firmware/export/mv.h
+++ b/firmware/export/mv.h
@@ -37,18 +37,29 @@
37#define IF_MD(x...) 37#define IF_MD(x...)
38#define IF_MD_NONVOID(x...) void 38#define IF_MD_NONVOID(x...) void
39#define IF_MD_DRV(d) 0 39#define IF_MD_DRV(d) 0
40#endif 40#endif /* HAVE_MULTIDRIVE */
41 41
42/* Volumes mean things that have filesystems on them, like partitions */ 42/* Volumes mean things that have filesystems on them, like partitions */
43#ifdef HAVE_MULTIVOLUME 43#ifdef HAVE_MULTIVOLUME
44#define IF_MV(x...) x /* valist contents or empty */ 44#define IF_MV(x...) x /* valist contents or empty */
45#define IF_MV_NONVOID(x...) x /* valist contents or 'void' */ 45#define IF_MV_NONVOID(x...) x /* valist contents or 'void' */
46#define IF_MV_VOL(v) v /* volume argument or '0' */ 46#define IF_MV_VOL(v) v /* volume argument or '0' */
47/* how to name volumes, first char must be outside of legal file names,
48 a number gets appended to enumerate, if applicable */
49#if (CONFIG_STORAGE & STORAGE_MMC)
50#define VOL_NAMES "<MMC%d>"
51#define VOL_ENUM_POS 4 /* position of %d, to avoid runtime calculation */
52#elif (CONFIG_STORAGE & STORAGE_SD)
53#define VOL_NAMES "<microSD%d>"
54#define VOL_ENUM_POS 8 /* position of %d, to avoid runtime calculation */
55#else
56#define VOL_NAMES "<HD%d>"
57#define VOL_ENUM_POS 3
58#endif /* CONFIG_STORAGE */
47#else /* empty definitions if no multi-volume */ 59#else /* empty definitions if no multi-volume */
48#define IF_MV(x...) 60#define IF_MV(x...)
49#define IF_MV_NONVOID(x...) void 61#define IF_MV_NONVOID(x...) void
50#define IF_MV_VOL(v) 0 62#define IF_MV_VOL(v) 0
51#endif 63#endif /* HAVE_MULTIVOLUME */
52
53 64
54#endif /* __MV_H__ */ 65#endif /* __MV_H__ */
diff --git a/firmware/include/dir.h b/firmware/include/dir.h
index 3427893024..6e8b70588e 100644
--- a/firmware/include/dir.h
+++ b/firmware/include/dir.h
@@ -24,23 +24,6 @@
24 24
25#include "config.h" 25#include "config.h"
26 26
27#ifdef HAVE_MULTIVOLUME
28
29/* how to name volumes, first char must be outside of legal file names,
30 a number gets appended to enumerate, if applicable */
31#if (CONFIG_STORAGE & STORAGE_MMC)
32#define VOL_NAMES "<MMC%d>"
33#define VOL_ENUM_POS 4 /* position of %d, to avoid runtime calculation */
34#elif (CONFIG_STORAGE & STORAGE_SD)
35#define VOL_NAMES "<microSD%d>"
36#define VOL_ENUM_POS 8 /* position of %d, to avoid runtime calculation */
37#else
38#define VOL_NAMES "<HD%d>"
39#define VOL_ENUM_POS 3
40#endif
41
42#endif
43
44#define ATTR_READ_ONLY 0x01 27#define ATTR_READ_ONLY 0x01
45#define ATTR_HIDDEN 0x02 28#define ATTR_HIDDEN 0x02
46#define ATTR_SYSTEM 0x04 29#define ATTR_SYSTEM 0x04