summaryrefslogtreecommitdiff
path: root/firmware/export/mv.h
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/export/mv.h')
-rw-r--r--firmware/export/mv.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/firmware/export/mv.h b/firmware/export/mv.h
index 966ff9a032..9d202a8087 100644
--- a/firmware/export/mv.h
+++ b/firmware/export/mv.h
@@ -23,6 +23,7 @@
23#define __MV_H__ 23#define __MV_H__
24 24
25#include <stdbool.h> 25#include <stdbool.h>
26#include <stdint.h>
26#include "config.h" 27#include "config.h"
27 28
28/* FixMe: These macros are a bit nasty and perhaps misplaced here. 29/* FixMe: These macros are a bit nasty and perhaps misplaced here.
@@ -40,6 +41,19 @@
40#define IF_MD_DRV(d) 0 41#define IF_MD_DRV(d) 0
41#endif /* HAVE_MULTIDRIVE */ 42#endif /* HAVE_MULTIDRIVE */
42 43
44/* Storage size */
45#if (CONFIG_STORAGE & STORAGE_ATA) && defined(HAVE_LBA48)
46typedef uint64_t sector_t;
47#define STORAGE_64BIT_SECTOR
48#elif (CONFIG_STORAGE & STORAGE_SD) && defined(HAVE_SDUC)
49typedef uint64_t sector_t;
50#define STORAGE_64BIT_SECTOR
51#else
52typedef unsigned long sector_t;
53#undef STORAGE_64BIT_SECTOR
54#endif
55
56
43/* Volumes mean things that have filesystems on them, like partitions */ 57/* Volumes mean things that have filesystems on them, like partitions */
44#ifdef HAVE_MULTIVOLUME 58#ifdef HAVE_MULTIVOLUME
45#define IF_MV(x...) x /* valist contents or empty */ 59#define IF_MV(x...) x /* valist contents or empty */
@@ -113,13 +127,16 @@ struct volumeinfo
113/* Volume-centric functions (in disk.c) */ 127/* Volume-centric functions (in disk.c) */
114void volume_recalc_free(IF_MV_NONVOID(int volume)); 128void volume_recalc_free(IF_MV_NONVOID(int volume));
115unsigned int volume_get_cluster_size(IF_MV_NONVOID(int volume)); 129unsigned int volume_get_cluster_size(IF_MV_NONVOID(int volume));
116void volume_size(IF_MV(int volume,) unsigned long *size, unsigned long *free); 130void volume_size(IF_MV(int volume,) sector_t *size, sector_t *free);
117#ifdef HAVE_DIRCACHE 131#ifdef HAVE_DIRCACHE
118bool volume_ismounted(IF_MV_NONVOID(int volume)); 132bool volume_ismounted(IF_MV_NONVOID(int volume));
119#endif 133#endif
120#ifdef HAVE_HOTSWAP 134#ifdef HAVE_HOTSWAP
121bool volume_removable(int volume); 135bool volume_removable(int volume);
122bool volume_present(int volume); 136bool volume_present(int volume);
137#else
138#define volume_present(x) 1
139#define volueme_removeable(x) 0
123#endif /* HAVE_HOTSWAP */ 140#endif /* HAVE_HOTSWAP */
124 141
125#ifdef HAVE_MULTIDRIVE 142#ifdef HAVE_MULTIDRIVE