switch (app_type) {
case AT_TIZEN_NATIVE_APP:
+ case AT_TIZEN_WEB_APP:
case AT_COMMON_EXEC:
ai->tgid = 0;
break;
case AT_PID: {
- u32 tgid;
- ret = str_to_u32(ta_id, &tgid);
- if (ret) {
- print_err("converting string to PID, str='%s'\n", ta_id);
- goto free_ai;
+ u32 tgid = 0;
+
+ if (*ta_id != '\0') {
+ ret = str_to_u32(ta_id, &tgid);
+ if (ret) {
+ print_err("converting string to PID, "
+ "str='%s'\n", ta_id);
+ goto free_ai;
+ }
}
ai->tgid = tgid;
kfree(conf);
}
+static struct conf_data config;
+void save_config(const struct conf_data *conf)
+{
+ memcpy(&config, conf, sizeof(config));
+}
+void restore_config(struct conf_data *conf)
+{
+ memcpy(conf, &config, sizeof(*conf));
+}
struct func_inst_data *fi;
u64 addr;
char *args;
+ char ret_type;
print_parse_debug("func addr:");
if (get_u64(mb, &addr)) {
return NULL;
}
+ print_parse_debug("funct ret type:");
+ if (get_u8(mb, (u8 *)&ret_type)) {
+ print_err("failed to read data function arguments\n");
+ goto free_args;
+ }
+
fi = kmalloc(sizeof(*fi), GFP_KERNEL);
if (fi == NULL) {
print_err("out of memory\n");
- put_string(args);
- return NULL;
+ goto free_args;
}
fi->addr = addr;
fi->args = args;
+ fi->ret_type = ret_type;
return fi;
+
+free_args:
+ put_string(args);
+ return NULL;
}
void destroy_func_inst_data(struct func_inst_data *fi)
print_parse_debug("func count:");
if (get_u32(mb, &cnt)) {
print_err("failed to read count of functions\n");
- return NULL;
+ goto free_path;
}
if (remained_mb(mb) / MIN_SIZE_FUNC_INST < cnt) {
print_err("to match count of functions(%u)\n", cnt);
- return NULL;
+ goto free_path;
}
li = kmalloc(sizeof(*li), GFP_KERNEL);