[Feature][T108][task-view-289]Integration of fstrim tool and development of corresponding gsw hal layer code
Only Configure: No
Affected branch: GSW_V1453
Affected module: filesystem
Is it affected on IC: only ASR
Self-test: yes
Doc Update: no
Change-Id: I6ddd5ce8b84aefaa5dace1291c5b2db4e3f57325
diff --git a/mbtk/libgsw_lib/gsw_hwpin_interface.c b/mbtk/libgsw_lib/gsw_hwpin_interface.c
index d132b01..af452ac 100755
--- a/mbtk/libgsw_lib/gsw_hwpin_interface.c
+++ b/mbtk/libgsw_lib/gsw_hwpin_interface.c
@@ -770,5 +770,19 @@
int gsw_hwpin_fstrim_emmc(const char *emmc_path)
{
+ char cmd[256] = {0};
+ int ret = 0;
+
+ if(!emmc_path || access(emmc_path, F_OK) != 0)
+ {
+ LOGE("Invalid path : %s", emmc_path);
+ return ret;
+ }
+
+ sprintf(cmd, "fstrim -v %s", emmc_path);
+ ret = system(cmd);
+
+ LOGI("command %s, ret : %d", cmd, ret);
+
return GSW_HAL_SUCCESS;
}
\ No newline at end of file