summaryrefslogtreecommitdiffstats
path: root/exfat/libexfat/exfat.h
diff options
context:
space:
mode:
authorbigbiff bigbiff <bigbiff@teamw.in>2013-07-03 20:52:12 +0200
committerbigbiff bigbiff <bigbiff@teamw.in>2013-07-03 20:52:12 +0200
commit004e2df74a3a92d431e573c60626b5dce36cca98 (patch)
treeaf8203944e665972cd3c09ec2d5f7c4ca8cdf4f2 /exfat/libexfat/exfat.h
parentRewrite TWFunc::Exec_Cmd() to use pipe() instead of popen() (diff)
downloadandroid_bootable_recovery-004e2df74a3a92d431e573c60626b5dce36cca98.tar
android_bootable_recovery-004e2df74a3a92d431e573c60626b5dce36cca98.tar.gz
android_bootable_recovery-004e2df74a3a92d431e573c60626b5dce36cca98.tar.bz2
android_bootable_recovery-004e2df74a3a92d431e573c60626b5dce36cca98.tar.lz
android_bootable_recovery-004e2df74a3a92d431e573c60626b5dce36cca98.tar.xz
android_bootable_recovery-004e2df74a3a92d431e573c60626b5dce36cca98.tar.zst
android_bootable_recovery-004e2df74a3a92d431e573c60626b5dce36cca98.zip
Diffstat (limited to 'exfat/libexfat/exfat.h')
-rw-r--r--exfat/libexfat/exfat.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/exfat/libexfat/exfat.h b/exfat/libexfat/exfat.h
index 3e4223e5d..a6a9f706d 100644
--- a/exfat/libexfat/exfat.h
+++ b/exfat/libexfat/exfat.h
@@ -46,6 +46,7 @@
#define MAX(a, b) ((a) > (b) ? (a) : (b))
#define DIV_ROUND_UP(x, d) (((x) + (d) - 1) / (d))
#define ROUND_UP(x, d) (DIV_ROUND_UP(x, d) * (d))
+#define UTF8_BYTES(c) ((c) * 6) /* UTF-8 character can occupy up to 6 bytes */
#define BMAP_GET(bitmap, index) \
(((uint8_t*) bitmap)[(index) / 8] & (1u << ((index) % 8)))
@@ -98,8 +99,7 @@ struct exfat
bool dirty;
}
cmap;
- char label[EXFAT_ENAME_MAX * 6 + 1]; /* a character can occupy up to
- 6 bytes in UTF-8 */
+ char label[UTF8_BYTES(EXFAT_ENAME_MAX) + 1];
void* zero_cluster;
int dmask, fmask;
uid_t uid;