dso__delete(dso);
}
-void dso__set_build_id(struct dso *dso, void *build_id)
+void dso__set_build_id(struct dso *dso, struct build_id *bid)
{
- memcpy(dso->bid.data, build_id, sizeof(dso->bid.data));
+ dso->bid = *bid;
dso->has_build_id = 1;
}
void dso__set_sorted_by_name(struct dso *dso);
void dso__sort_by_name(struct dso *dso);
-void dso__set_build_id(struct dso *dso, void *build_id);
+void dso__set_build_id(struct dso *dso, struct build_id *bid);
bool dso__build_id_equal(const struct dso *dso, u8 *build_id);
void dso__read_running_kernel_build_id(struct dso *dso,
struct machine *machine);
dso = machine__findnew_dso(machine, filename);
if (dso != NULL) {
char sbuild_id[SBUILD_ID_SIZE];
+ struct build_id bid;
- dso__set_build_id(dso, &bev->build_id);
+ build_id__init(&bid, bev->build_id, BUILD_ID_SIZE);
+ dso__set_build_id(dso, &bid);
if (dso_space != DSO_SPACE__USER) {
struct kmod_path m = { .name = NULL, };
dso->is_64_bit = ret;
if (filename__read_build_id(ss->name, &bid) > 0)
- dso__set_build_id(dso, bid.data);
+ dso__set_build_id(dso, &bid);
return 0;
}
is_regular_file(dso->long_name)) {
__symbol__join_symfs(name, PATH_MAX, dso->long_name);
if (filename__read_build_id(name, &bid) > 0)
- dso__set_build_id(dso, bid.data);
+ dso__set_build_id(dso, &bid);
}
/*