Skip to content

Commit

Permalink
Remove sysfd
Browse files Browse the repository at this point in the history
sysfd isn't used anymore in svg_title() and has never been since moving
into main() as a local variable. Let's remove it.

Follow-up-for: f91781329c6d8a760e3c1b88b66b0e2137c2e5ab@systemd
  • Loading branch information
Łukasz Stelmach authored and bluca committed Jan 16, 2025
1 parent fb23645 commit 6fbc82c
Showing 1 changed file with 0 additions and 4 deletions.
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

0 comments on commit 6fbc82c

Please sign in to comment.