chiark / gitweb /
Revert "bootchart: use _cleanup_close_"
[elogind.git] / src / bootchart / bootchart.h
index 9127f92302d258477a8e4bacad6a8da9ca74b578..0fe4d2f4da75ce530c7bc7454a5d4d3f4196d0af 100644 (file)
@@ -1,18 +1,27 @@
-/*
- * bootchart.h
- *
- * 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.h - 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 <dirent.h>
+#include <stdbool.h>
 
 #define MAXCPUS        16
 #define MAXPIDS     65535
@@ -52,7 +61,7 @@ struct ps_struct {
         struct ps_struct *next;       /* siblings */
 
         /* must match - otherwise it's a new process with same PID */
-        char name[16];
+        char name[256];
         int pid;
         int ppid;
 
@@ -90,14 +99,15 @@ extern struct ps_struct *ps_first;
 extern struct block_stat_struct blockstat[];
 extern struct cpu_stat_struct cpustat[];
 extern int pscount;
-extern int relative;
-extern int filter;
-extern int pss;
-extern int entropy;
-extern int initcall;
+extern bool relative;
+extern bool filter;
+extern bool show_cmdline;
+extern bool pss;
+extern bool entropy;
+extern bool initcall;
 extern int samples;
 extern int cpus;
-extern int len;
+extern int samples_len;
 extern double hz;
 extern double scale_x;
 extern double scale_y;
@@ -109,9 +119,11 @@ extern char init_path[PATH_MAX];
 
 extern FILE *of;
 extern DIR *proc;
+extern int procfd;
+extern int sysfd;
 
 extern double gettime_ns(void);
 extern void log_uptime(void);
 extern void log_sample(int sample);
 
-extern void svg_do(void);
+extern void svg_do(const char *build);