PS_Mount_Fast api newly introduced in Tizen 7.0 to improve
mount performance by security team.
Existing PS_Mount API used fork-exec method,
but PS_Mount_Fast API calls mount system function.
There is a performance improvement of about 900ms,
and with this new API, it takes about 500ms at the time of cold boot.
Reference:
https://review.tizen.org/gerrit/282899/
Change-Id: I87680117715cc972019f9ead4cc1e7055f2a6723
Signed-off-by: Sugyum Kim <su.g.kim@samsung.com>
(cherry picked from commit
0298504f5fa3bffba9d327993d06a276c875f6cf)
#include <iostream>
#include <string>
+#include "chromium_impl/build/tizen_version.h"
+
#define FILE_LOG_OUT
#include "dlog_util.h"
int rv = SUCCESS;
int result = SUCCESS;
- if (mount)
+ if (mount) {
+#if TIZEN_VERSION_AT_LEAST(7, 0, 0)
+ rv = PS_Mount_Fast(args, strlen(args) + 1, 1, &result);
+#else
rv = PS_Mount(args, strlen(args) + 1, 1, &result);
+#endif
+ }
else
rv = PS_Umount(args, strlen(args) + 1, 1, &result);
LOG(INFO) << "result = " << rv << ", " << result;