static int add_bins_to_gtp(struct user_space_inst_t *us_inst)
{
- struct lib_list_t *lib = us_inst->lib_inst_list;
struct app_list_t *app = us_inst->app_inst_list;
uint32_t total_maps_count = 0;
char real_path_buf[PATH_MAX];
- char *resolved, *p;
+ char *resolved;
FILE *gtp_p;
gtp_p = fopen(GTP_ADD_BIN, "w");
if (gtp_p == NULL)
return -EINVAL;
- while (lib != NULL) {
- total_maps_count++;
-
- p = lib->lib->bin_path;
- fwrite(p, strlen(p) + 1, 1, gtp_p);
- fflush(gtp_p);
-
- LOGI("lib #%u <%s>\n", total_maps_count, lib->lib->bin_path);
- lib = (struct lib_list_t *)lib->next;
- }
-
while (app != NULL) {
resolved = realpath((const char *)app->app->exe_path, real_path_buf);
if (resolved != NULL) {