chiark / gitweb /
bootchart: remove duplicated code, prevent creating empty files
[elogind.git] / src / bootchart / bootchart.c
index 99ffb86c8730ee09b9662b5b69a8869e7b2a388a..71dffc9ae8b3a497ee2fc43cf8ca5b1add8958e2 100644 (file)
@@ -395,15 +395,6 @@ int main(int argc, char *argv[]) {
                 sampledata->sampletime = gettime_ns();
                 sampledata->counter = samples;
 
-                if (!of && (access(arg_output_path, R_OK|W_OK|X_OK) == 0)) {
-                        t = time(NULL);
-                        r = strftime(datestr, sizeof(datestr), "%Y%m%d-%H%M", localtime(&t));
-                        assert_se(r > 0);
-
-                        snprintf(output_file, PATH_MAX, "%s/bootchart-%s.svg", arg_output_path, datestr);
-                        of = fopen(output_file, "we");
-                }
-
                 if (sysfd < 0)
                         sysfd = open("/sys", O_RDONLY|O_CLOEXEC);