From 706e6b7a75339cadc7b8a856a2eace68f89bb168 Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Tue, 18 Feb 2014 07:11:11 +0100 Subject: Move VOL_NAMES definition to mv.h Fits better and including dir.h is more messy for some places. Change-Id: I3ec30dcc1ac2734ad3844c903238b6cc2f4e134c --- apps/playlist.c | 2 +- apps/root_menu.c | 2 +- firmware/export/mv.h | 17 ++++++++++++++--- firmware/include/dir.h | 17 ----------------- 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 @@ #include "ata_idle_notify.h" #include "file.h" #include "action.h" -#include "dir.h" +#include "mv.h" #include "debug.h" #include "audio.h" #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 @@ #ifdef HAVE_HOTSWAP #include "storage.h" -#include "dir.h" +#include "mv.h" #endif /* gui api */ #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 @@ #define IF_MD(x...) #define IF_MD_NONVOID(x...) void #define IF_MD_DRV(d) 0 -#endif +#endif /* HAVE_MULTIDRIVE */ /* Volumes mean things that have filesystems on them, like partitions */ #ifdef HAVE_MULTIVOLUME #define IF_MV(x...) x /* valist contents or empty */ #define IF_MV_NONVOID(x...) x /* valist contents or 'void' */ #define IF_MV_VOL(v) v /* volume argument or '0' */ +/* how to name volumes, first char must be outside of legal file names, + a number gets appended to enumerate, if applicable */ +#if (CONFIG_STORAGE & STORAGE_MMC) +#define VOL_NAMES "" +#define VOL_ENUM_POS 4 /* position of %d, to avoid runtime calculation */ +#elif (CONFIG_STORAGE & STORAGE_SD) +#define VOL_NAMES "" +#define VOL_ENUM_POS 8 /* position of %d, to avoid runtime calculation */ +#else +#define VOL_NAMES "" +#define VOL_ENUM_POS 3 +#endif /* CONFIG_STORAGE */ #else /* empty definitions if no multi-volume */ #define IF_MV(x...) #define IF_MV_NONVOID(x...) void #define IF_MV_VOL(v) 0 -#endif - +#endif /* HAVE_MULTIVOLUME */ #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 @@ #include "config.h" -#ifdef HAVE_MULTIVOLUME - -/* how to name volumes, first char must be outside of legal file names, - a number gets appended to enumerate, if applicable */ -#if (CONFIG_STORAGE & STORAGE_MMC) -#define VOL_NAMES "" -#define VOL_ENUM_POS 4 /* position of %d, to avoid runtime calculation */ -#elif (CONFIG_STORAGE & STORAGE_SD) -#define VOL_NAMES "" -#define VOL_ENUM_POS 8 /* position of %d, to avoid runtime calculation */ -#else -#define VOL_NAMES "" -#define VOL_ENUM_POS 3 -#endif - -#endif - #define ATTR_READ_ONLY 0x01 #define ATTR_HIDDEN 0x02 #define ATTR_SYSTEM 0x04 -- cgit v1.2.3