X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fbootchart%2Fsvg.c;h=6ad7348ecbe76ff7302821c614fa7809bed31af1;hb=895aeb27795c00f365ce3b30b1dca549b4f5468e;hp=156918a94bf7f79e865b0f2dda57ead92f7e795f;hpb=28989b63f5e3a959557000f21f3891af08be40f7;p=elogind.git diff --git a/src/bootchart/svg.c b/src/bootchart/svg.c index 156918a94..6ad7348ec 100644 --- a/src/bootchart/svg.c +++ b/src/bootchart/svg.c @@ -1,16 +1,24 @@ -/* - * svg.c - * - * Copyright (C) 2009-2012 Intel Coproration - * - * Authors: - * Auke Kok - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; version 2 - * of the License. - */ +/*** + bootchart.c - This file is part of systemd-bootchart + + Copyright (C) 2009-2013 Intel Coproration + + Authors: + Auke Kok + + systemd is free software; you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + systemd is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with systemd; If not, see . + ***/ #include #include @@ -22,6 +30,8 @@ #include #include "bootchart.h" +#include "util.h" +#include "macro.h" #define time_to_graph(t) ((t) * scale_x) @@ -85,10 +95,10 @@ static void svg_header(void) /* write some basic info as a comment, including some help */ svg("\n"); - svg("\n"); - svg("\n"); - svg("\n"); - svg("\n\n"); + svg("\n"); + svg("\n"); + svg("\n"); + svg("\n\n"); svg("\n", VERSION); svg("\n", hz, len); @@ -702,7 +712,7 @@ static int ps_filter(struct ps_struct *ps) static void svg_do_initcall(int count_only) { - FILE *f; + FILE _cleanup_pclose_ *f = NULL; double t; char func[256]; int ret; @@ -787,8 +797,6 @@ static void svg_do_initcall(int count_only) kcount++; } - - fclose(f); }