#define ELM_CONFIG_LIST(edd, type, member, eddtype) \
EET_DATA_DESCRIPTOR_ADD_LIST(edd, type, #member, member, eddtype)
+// TIZEN_ONLY(20160824):support lazy mount of user data area
+//
+// elm_config would access to user home directory to save their info
+// However, elm_config couldn't accesss to that path because
+// user data area could not be mounted (lazy mount applied)
+//
+// elm_config monitors a file(TIZEN_MOUNT_CHECK_PATH) which is created
+// after mounting. then if it doesn't exist, elm_config will access to
+// the fallback path based on TIZEN_UNMOUNT_FALLBACK_BASE_DIR
+#define TIZEN_MOUNT_CHECK_PATH getenv("HOME")
+#define TIZEN_UNMOUNT_FALLBACK_BASE_DIR "/opt"
+// END
+
static void
_elm_font_overlays_del_free(void)
{
return off;
}
+// TIZEN_ONLY(20160824):support lazy mount of user data area
+static size_t
+_elm_config_user_fallback_dir(char *dst,
+ size_t size)
+{
+ size_t len = 0, off = 0;
+ len = snprintf(dst + off, size - off, "%s", TIZEN_UNMOUNT_FALLBACK_BASE_DIR);
+ if (len >= size - off) return off ;
+ off += len;
+ len = snprintf(dst + off, size - off, "/%s", ELEMENTARY_BASE_DIR);
+ if (len >= size - off) return off ;
+ off += len;
+#if defined(HAVE_GETUID)
+ len = snprintf(dst + off, size - off, "/%d", getuid());
+ if (len >= size - off) return off ;
+ off += len;
+#endif
+ return off ;
+}
+static Eina_Bool
+_user_data_path_mounted()
+{
+ return ecore_file_is_dir(TIZEN_MOUNT_CHECK_PATH);
+}
+//END
size_t
_elm_config_user_dir_snprintf(char *dst,
size_t size,
const char *home = NULL;
size_t user_dir_len = 0, off = 0;
va_list ap;
-
+//TIZEN_ONLY(20160824):support lazy mount of user data area
+ if (!_user_data_path_mounted())
+ {
+ user_dir_len = _elm_config_user_fallback_dir(dst, size);
+ off = user_dir_len + 1;
+ if (off >= size) return off;
+ dst[user_dir_len] = '/';
+ va_start(ap, fmt);
+ off += vsnprintf(dst + off, size - off, fmt, ap);
+ va_end(ap);
+ return off;
+ }
+//END
#if defined(HAVE_GETUID) && defined(HAVE_GETEUID)
if (getuid() == geteuid())
#endif