summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorderfelot <frederic.koch@gmail.com>2018-08-09 23:47:24 +0200
committerAndreas Schneider <asn@cryptomilk.org>2018-08-20 15:38:47 +0200
commitdaca7c28f28dbe9bf1791ae883dfc83d38ac4e8a (patch)
treefdacadfe50a13c795f41514568ff94e07b5c6877
parentf3a2a47c5b6cd42babdf053fc99ce96152005f37 (diff)
fs: sdfat: Update to version 2.0.8
Taken from SM-G965F_OO_Opensource kernel (G965FXXU2BRG6) This is a fix of a661c8568be7ba543e0bc33d1599beca8071d3c3.
-rw-r--r--statistics.c38
-rw-r--r--version.h2
2 files changed, 26 insertions, 14 deletions
diff --git a/statistics.c b/statistics.c
index 00624df5a636..2ae1a93fb330 100644
--- a/statistics.c
+++ b/statistics.c
@@ -47,8 +47,10 @@ static struct kset *sdfat_statistics_kset;
static ssize_t vfat_cl_show(struct kobject *kobj,
struct kobj_attribute *attr, char *buff)
{
- return snprintf(buff, PAGE_SIZE, "VCL_512B_I:%u,VCL_1K_I:%u,VCL_2K_I:%u,"
- "VCL_4K_I:%u,VCL_8K_I:%u,VCL_16K_I:%u,VCL_32K_I:%u\n",
+ return snprintf(buff, PAGE_SIZE, "\"VCL_512B_I\":\"%u\","
+ "\"VCL_1K_I\":\"%u\",\"VCL_2K_I\":\"%u\","
+ "\"VCL_4K_I\":\"%u\",\"VCL_8K_I\":\"%u\","
+ "\"VCL_16K_I\":\"%u\",\"VCL_32K_I\":\"%u\"\n",
statistics.clus_vfat[0], statistics.clus_vfat[1],
statistics.clus_vfat[2], statistics.clus_vfat[3],
statistics.clus_vfat[4], statistics.clus_vfat[5],
@@ -58,10 +60,15 @@ static ssize_t vfat_cl_show(struct kobject *kobj,
static ssize_t exfat_cl_show(struct kobject *kobj,
struct kobj_attribute *attr, char *buff)
{
- return snprintf(buff, PAGE_SIZE, "ECL_512B_I:%u,ECL_1K_I:%u,ECL_2K_I:%u,"
- "ECL_4K_I:%u,ECL_8K_I:%u,ECL_16K_I:%u,ECL_32K_I:%u,ECL_64K_I:%u,"
- "ECL_128K_I:%u,ECL_256K_I:%u,ECL_512K_I:%u,ECL_1M_I:%u,"
- "ECL_2M_I:%u,ECL_4M_I:%u,ECL_8M_I:%u,ECL_16M_I:%u,ECL_32M_I:%u\n",
+ return snprintf(buff, PAGE_SIZE, "\"ECL_512B_I\":\"%u\","
+ "\"ECL_1K_I\":\"%u\",\"ECL_2K_I\":\"%u\","
+ "\"ECL_4K_I\":\"%u\",\"ECL_8K_I\":\"%u\","
+ "\"ECL_16K_I\":\"%u\",\"ECL_32K_I\":\"%u\","
+ "\"ECL_64K_I\":\"%u\",\"ECL_128K_I\":\"%u\","
+ "\"ECL_256K_I\":\"%u\",\"ECL_512K_I\":\"%u\","
+ "\"ECL_1M_I\":\"%u\",\"ECL_2M_I\":\"%u\","
+ "\"ECL_4M_I\":\"%u\",\"ECL_8M_I\":\"%u\","
+ "\"ECL_16M_I\":\"%u\",\"ECL_32M_I\":\"%u\"\n",
statistics.clus_exfat[0], statistics.clus_exfat[1],
statistics.clus_exfat[2], statistics.clus_exfat[3],
statistics.clus_exfat[4], statistics.clus_exfat[5],
@@ -76,8 +83,9 @@ static ssize_t exfat_cl_show(struct kobject *kobj,
static ssize_t mount_show(struct kobject *kobj,
struct kobj_attribute *attr, char *buff)
{
- return snprintf(buff, PAGE_SIZE, "FAT12_MNT_I:%u,FAT16_MNT_I:%u,FAT32_MNT_I:%u,"
- "EXFAT_MNT_I:%u\n",
+ return snprintf(buff, PAGE_SIZE, "\"FAT12_MNT_I\":\"%u\","
+ "\"FAT16_MNT_I\":\"%u\",\"FAT32_MNT_I\":\"%u\","
+ "\"EXFAT_MNT_I\":\"%u\"\n",
statistics.mnt_cnt[SDFAT_MNT_FAT12],
statistics.mnt_cnt[SDFAT_MNT_FAT16],
statistics.mnt_cnt[SDFAT_MNT_FAT32],
@@ -87,8 +95,10 @@ static ssize_t mount_show(struct kobject *kobj,
static ssize_t nofat_op_show(struct kobject *kobj,
struct kobj_attribute *attr, char *buff)
{
- return snprintf(buff, PAGE_SIZE, "NOFAT_MOUNT_I:%u,NOFAT_MKDIR_I:%u,NOFAT_CREATE_I:%u,"
- "NOFAT_READ_I:%u,NOFAT_WRITE_I:%u,NOFAT_TRUNC_I:%u\n",
+ return snprintf(buff, PAGE_SIZE, "\"NOFAT_MOUNT_I\":\"%u\","
+ "\"NOFAT_MKDIR_I\":\"%u\",\"NOFAT_CREATE_I\":\"%u\","
+ "\"NOFAT_READ_I\":\"%u\",\"NOFAT_WRITE_I\":\"%u\","
+ "\"NOFAT_TRUNC_I\":\"%u\"\n",
statistics.nofat_op[SDFAT_OP_EXFAT_MNT],
statistics.nofat_op[SDFAT_OP_MKDIR],
statistics.nofat_op[SDFAT_OP_CREATE],
@@ -100,9 +110,11 @@ static ssize_t nofat_op_show(struct kobject *kobj,
static ssize_t vol_size_show(struct kobject *kobj,
struct kobj_attribute *attr, char *buff)
{
- return snprintf(buff, PAGE_SIZE, "VOL_4G_I:%u,VOL_8G_I:%u,VOL_16G_I:%u,"
- "VOL_32G_I:%u,VOL_64G_I:%u,VOL_128G_I:%u,VOL_256G_I:%u,"
- "VOL_512G_I:%u,VOL_XTB_I:%u\n",
+ return snprintf(buff, PAGE_SIZE, "\"VOL_4G_I\":\"%u\","
+ "\"VOL_8G_I\":\"%u\",\"VOL_16G_I\":\"%u\","
+ "\"VOL_32G_I\":\"%u\",\"VOL_64G_I\":\"%u\","
+ "\"VOL_128G_I\":\"%u\",\"VOL_256G_I\":\"%u\","
+ "\"VOL_512G_I\":\"%u\",\"VOL_XTB_I\":\"%u\"\n",
statistics.vol_size[SDFAT_VOL_4G],
statistics.vol_size[SDFAT_VOL_8G],
statistics.vol_size[SDFAT_VOL_16G],
diff --git a/version.h b/version.h
index c49175c0228b..999f052a7e92 100644
--- a/version.h
+++ b/version.h
@@ -22,4 +22,4 @@
/* PURPOSE : sdFAT File Manager */
/* */
/************************************************************************/
-#define SDFAT_VERSION "2.0.6-lineage"
+#define SDFAT_VERSION "2.0.8-lineage"