inject-buildid.c (0aba7f036a56675b7fdc536757b4c49fc76a2208) inject-buildid.c (f766819cd5290d42efa55c505b9bed184fec17bf)
1// SPDX-License-Identifier: GPL-2.0
2#include <stdlib.h>
3#include <stddef.h>
4#include <ftw.h>
5#include <fcntl.h>
6#include <errno.h>
7#include <unistd.h>
8#include <pthread.h>

--- 70 unchanged lines hidden (view full) ---

79 int typeflag, struct FTW *ftwbuf __maybe_unused)
80{
81 struct bench_dso *dso = &dsos[nr_dsos];
82 struct build_id bid;
83
84 if (typeflag == FTW_D || typeflag == FTW_SL)
85 return 0;
86
1// SPDX-License-Identifier: GPL-2.0
2#include <stdlib.h>
3#include <stddef.h>
4#include <ftw.h>
5#include <fcntl.h>
6#include <errno.h>
7#include <unistd.h>
8#include <pthread.h>

--- 70 unchanged lines hidden (view full) ---

79 int typeflag, struct FTW *ftwbuf __maybe_unused)
80{
81 struct bench_dso *dso = &dsos[nr_dsos];
82 struct build_id bid;
83
84 if (typeflag == FTW_D || typeflag == FTW_SL)
85 return 0;
86
87 if (filename__read_build_id(fpath, bid.data, sizeof(bid.data)) < 0)
87 if (filename__read_build_id(fpath, &bid) < 0)
88 return 0;
89
90 dso->name = realpath(fpath, NULL);
91 if (dso->name == NULL)
92 return -1;
93
94 dso->ino = nr_dsos++;
95 pr_debug2(" Adding DSO: %s\n", fpath);

--- 381 unchanged lines hidden ---
88 return 0;
89
90 dso->name = realpath(fpath, NULL);
91 if (dso->name == NULL)
92 return -1;
93
94 dso->ino = nr_dsos++;
95 pr_debug2(" Adding DSO: %s\n", fpath);

--- 381 unchanged lines hidden ---