summaryrefslogtreecommitdiffstats
path: root/common.h
diff options
context:
space:
mode:
Diffstat (limited to 'common.h')
-rw-r--r--common.h25
1 files changed, 5 insertions, 20 deletions
diff --git a/common.h b/common.h
index a1168cdbb..768f499f9 100644
--- a/common.h
+++ b/common.h
@@ -18,13 +18,13 @@
#define RECOVERY_COMMON_H
#include <stdio.h>
+#include <stdarg.h>
#ifdef __cplusplus
extern "C" {
#endif
-// TODO: restore ui_print for LOGE
-#define LOGE(...) fprintf(stdout, "E:" __VA_ARGS__)
+#define LOGE(...) ui_print("E:" __VA_ARGS__)
#define LOGW(...) fprintf(stdout, "W:" __VA_ARGS__)
#define LOGI(...) fprintf(stdout, "I:" __VA_ARGS__)
@@ -39,28 +39,13 @@ extern "C" {
#define STRINGIFY(x) #x
#define EXPAND(x) STRINGIFY(x)
-typedef struct {
- const char* mount_point; // eg. "/cache". must live in the root directory.
-
- const char* fs_type; // "yaffs2" or "ext4" or "vfat"
-
- const char* device; // MTD partition name if fs_type == "yaffs"
- // block device if fs_type == "ext4" or "vfat"
-
- const char* device2; // alternative device to try if fs_type
- // == "ext4" or "vfat" and mounting
- // 'device' fails
-
- long long length; // (ext4 partition only) when
- // formatting, size to use for the
- // partition. 0 or negative number
- // means to format all but the last
- // (that much).
-} Volume;
+typedef struct fstab_rec Volume;
// fopen a file, mounting volumes and making parent dirs as necessary.
FILE* fopen_path(const char *path, const char *mode);
+void ui_print(const char* format, ...);
+
#ifdef __cplusplus
}
#endif