Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove sysfd #56

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions src/bootchart.c
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,6 @@ int main(int argc, char *argv[]) {
_cleanup_closedir_ DIR *proc = NULL;
_cleanup_free_ char *build = NULL;
_cleanup_fclose_ FILE *of = NULL;
_cleanup_close_ int sysfd = -1;
int schfd;
struct ps_struct *ps_first;
double graph_start;
Expand Down Expand Up @@ -415,9 +414,6 @@ int main(int argc, char *argv[]) {
sampledata->sampletime = gettime_ns();
sampledata->counter = samples;

if (sysfd < 0)
sysfd = open("/sys", O_RDONLY|O_CLOEXEC);

if (!build) {
if (parse_env_file("/etc/os-release", NEWLINE, "PRETTY_NAME", &build, NULL) == -ENOENT)
parse_env_file("/usr/lib/os-release", NEWLINE, "PRETTY_NAME", &build, NULL);
Expand Down
Loading