-/*
- * svg.c
- *
- * Copyright (C) 2009-2012 Intel Coproration
- *
- * Authors:
- * Auke Kok <auke-jan.h.kok@intel.com>
- *
- * 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 <auke-jan.h.kok@intel.com>
+
+ 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 <http://www.gnu.org/licenses/>.
+ ***/
#include <stdio.h>
#include <stdarg.h>
#include <sys/utsname.h>
#include "bootchart.h"
+#include "util.h"
+#include "macro.h"
#define time_to_graph(t) ((t) * scale_x)
/* write some basic info as a comment, including some help */
svg("<!-- This file is a bootchart SVG file. It is best rendered in a browser -->\n");
- svg("<!-- such as Chrome/Chromium, firefox. Other applications that render -->\n");
- svg("<!-- these files properly but much more slow are ImageMagick, gimp, -->\n");
- svg("<!-- inkscape, etc.. To display the files on your system, just point -->\n");
- svg("<!-- your browser to file:///var/log/ and click. This bootchart was -->\n\n");
+ svg("<!-- such as Chrome, Chromium, or Firefox. Other applications that -->\n");
+ svg("<!-- render these files properly but more slowly are ImageMagick, gimp, -->\n");
+ svg("<!-- inkscape, etc. To display the files on your system, just point -->\n");
+ svg("<!-- your browser to file:///run/log/ and click. This bootchart was -->\n\n");
svg("<!-- generated by bootchart version %s, running with options: -->\n", VERSION);
svg("<!-- hz=\"%f\" n=\"%d\" -->\n", hz, len);
static void svg_do_initcall(int count_only)
{
- FILE *f;
+ FILE _cleanup_pclose_ *f = NULL;
double t;
char func[256];
int ret;
kcount++;
}
-
- fclose(f);
}