diff options
Diffstat (limited to 'init/bootchartd.c')
-rw-r--r-- | init/bootchartd.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/init/bootchartd.c b/init/bootchartd.c index 750f67356..ae1ee9d9a 100644 --- a/init/bootchartd.c +++ b/init/bootchartd.c | |||
@@ -218,10 +218,10 @@ static char *make_tempdir(void) | |||
218 | 218 | ||
219 | static void do_logging(unsigned sample_period_us, int process_accounting) | 219 | static void do_logging(unsigned sample_period_us, int process_accounting) |
220 | { | 220 | { |
221 | FILE *proc_stat = xfopen("proc_stat.log", "w"); | 221 | FILE *proc_stat = xfopen_for_write("proc_stat.log"); |
222 | FILE *proc_diskstats = xfopen("proc_diskstats.log", "w"); | 222 | FILE *proc_diskstats = xfopen_for_write("proc_diskstats.log"); |
223 | //FILE *proc_netdev = xfopen("proc_netdev.log", "w"); | 223 | //FILE *proc_netdev = xfopen_for_write("proc_netdev.log"); |
224 | FILE *proc_ps = xfopen("proc_ps.log", "w"); | 224 | FILE *proc_ps = xfopen_for_write("proc_ps.log"); |
225 | int look_for_login_process = (getppid() == 1); | 225 | int look_for_login_process = (getppid() == 1); |
226 | unsigned count = 60*1000*1000 / sample_period_us; /* ~1 minute */ | 226 | unsigned count = 60*1000*1000 / sample_period_us; /* ~1 minute */ |
227 | 227 | ||
@@ -268,7 +268,7 @@ static void finalize(char *tempdir, const char *prog, int process_accounting) | |||
268 | //local pacct= | 268 | //local pacct= |
269 | //[ -e kernel_pacct ] && pacct=kernel_pacct | 269 | //[ -e kernel_pacct ] && pacct=kernel_pacct |
270 | 270 | ||
271 | FILE *header_fp = xfopen("header", "w"); | 271 | FILE *header_fp = xfopen_for_write("header"); |
272 | 272 | ||
273 | if (process_accounting) | 273 | if (process_accounting) |
274 | acct(NULL); | 274 | acct(NULL); |