static void __make_preload_rw_list(GList *pkg_list)
{
FILE *file;
+ char err_buf[BUFSZE];
char pkg_info[BUFSZE];
if (pkg_list == NULL)
file = fopen(ALL_PRELOAD_RW_PKG_LIST, "a");
if (file == NULL) {
_E("can not open [%s]: %s\n", ALL_PRELOAD_RW_PKG_LIST,
- strerror(errno));
+ strerror_r(errno, err_buf, sizeof(err_buf)));
return;
}
}
FILE *file = NULL;
+ char buf[BUF_SIZE];
char tmp_path[BUF_SIZE];
snprintf(tmp_path, BUF_SIZE, "%s.tmp", ALL_PRELOAD_RW_PKG_LIST);
file = fopen(ALL_PRELOAD_RW_PKG_LIST, "w");
if (file == NULL) {
- _LOG("can not open [%s]: %s\n",
- ALL_PRELOAD_RW_PKG_LIST, strerror(errno));
+ _LOG("can not open [%s]: %s\n", ALL_PRELOAD_RW_PKG_LIST,
+ strerror_r(errno, buf, sizeof(buf)));
return;
}
g_hash_table_foreach(preload_rw_table, __iter_cb, file);
static int __check_tmp_all_preload_rw_pkg_list()
{
+ char buf[BUF_SIZE];
char tmp_path[BUF_SIZE];
snprintf(tmp_path, BUF_SIZE, "%s.tmp", ALL_PRELOAD_RW_PKG_LIST);
if (access(tmp_path, F_OK) == 0) {
if (rename(tmp_path, ALL_PRELOAD_RW_PKG_LIST)) {
_LOG("rename tmp all preload rw pkg list fail : %s\n",
- strerror(errno));
+ strerror_r(errno, buf, sizeof(buf)));
return -1;
}
}