- Refer the comment about RUNTIME_RESOURCED_DIR for details
Change-Id: I553dffac98579147feb3d885b2344fdef3a80294
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
#include <gio/gio.h>
#include <glib.h>
+#include <sys/stat.h>
+#include <sys/types.h>
#include <event.h>
#include <log.h>
return ret;
}
+ ret = mkdir(RUNTIME_RESOURCED_DIR, S_IRWXU | S_IRGRP | S_IXGRP);
+ if (ret < 0 && errno != EEXIST) {
+ _E("Failed to create directory %s: %m", RUNTIME_RESOURCED_DIR);
+ return ret;
+ }
+
return 0;
}
#include <gio/gio.h>
#include <glib.h>
+/**
+ * @brief Runtime resourced directory
+ * @details This directory is used for headed resourced to store app information.
+ * In current, resourced-headless doesn't store app information, but
+ * runtime-info tests check whether resourced is activated or not
+ * by the existance of this directory.
+ * To tell we provide per-process(app) information, resourced-headless
+ * will make this directory after proc-usage module is initialized.
+ */
+#define RUNTIME_RESOURCED_DIR "/run/resourced"
+
/**
* @brief Local event for proc-usage module
*/