summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mkfs.ubifs/compr.c3
-rw-r--r--mkfs.ubifs/mkfs.ubifs.c4
-rw-r--r--mkfs.ubifs/mkfs.ubifs.h2
3 files changed, 5 insertions, 4 deletions
diff --git a/mkfs.ubifs/compr.c b/mkfs.ubifs/compr.c
index 8ed2904..e378c5d 100644
--- a/mkfs.ubifs/compr.c
+++ b/mkfs.ubifs/compr.c
@@ -34,6 +34,7 @@
static void *lzo_mem;
static unsigned long long errcnt = 0;
+static struct ubifs_info *c = &info_;
#define DEFLATE_DEF_LEVEL Z_DEFAULT_COMPRESSION
#define DEFLATE_DEF_WINBITS 11
@@ -133,7 +134,7 @@ static int favor_lzo_compress(void *in_buf, size_t in_len, void *out_buf,
percent = (double)zlib_len / (double)lzo_len;
percent *= 100;
- if (percent > 100 - c->favor_lzo)
+ if (percent > 100 - c->favor_percent)
goto select_lzo;
goto select_zlib;
}
diff --git a/mkfs.ubifs/mkfs.ubifs.c b/mkfs.ubifs/mkfs.ubifs.c
index 8394df9..f8b4636 100644
--- a/mkfs.ubifs/mkfs.ubifs.c
+++ b/mkfs.ubifs/mkfs.ubifs.c
@@ -93,8 +93,8 @@ struct inum_mapping {
* Because we copy functions from the kernel, we use a subset of the UBIFS
* file-system description object struct ubifs_info.
*/
-static struct ubifs_info info_;
-struct ubifs_info *c = &info_;
+struct ubifs_info info_;
+static struct ubifs_info *c = &info_;
/* Debug levels are: 0 (none), 1 (statistics), 2 (files) ,3 (more details) */
int debug_level;
diff --git a/mkfs.ubifs/mkfs.ubifs.h b/mkfs.ubifs/mkfs.ubifs.h
index 705a9f9..3c0d79c 100644
--- a/mkfs.ubifs/mkfs.ubifs.h
+++ b/mkfs.ubifs/mkfs.ubifs.h
@@ -124,7 +124,7 @@ struct name_htbl_element {
dev_t dev;
};
-extern struct ubifs_info *c;
+extern struct ubifs_info info_;
struct hashtable_itr;