]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
wipefs: remove dead code
authorKarel Zak <kzak@redhat.com>
Fri, 11 Feb 2022 11:25:41 +0000 (12:25 +0100)
committerKarel Zak <kzak@redhat.com>
Fri, 11 Feb 2022 11:25:41 +0000 (12:25 +0100)
Since d9921b2a12 (2017-06-29) no_heading is enable for parsable
format, so this code is unnecessary.

Signed-off-by: Karel Zak <kzak@redhat.com>
misc-utils/wipefs.c

index 78dc63ee7acec8b1512351f7274243fb8e278be1..189af948a6c84b54af9e6fc76adf1d6412e17303 100644 (file)
@@ -188,28 +188,6 @@ static void init_output(struct wipe_control *ctl)
 
 static void finalize_output(struct wipe_control *ctl)
 {
-       if (ctl->parsable && !ctl->no_headings
-           && !scols_table_is_empty(ctl->outtab)) {
-               struct libscols_iter *itr = scols_new_iter(SCOLS_ITER_FORWARD);
-               struct libscols_column *cl;
-               int i = 0;
-
-               if (!itr)
-                       err_oom();
-
-               fputs("# ", stdout);
-               while (scols_table_next_column(ctl->outtab, itr, &cl) == 0) {
-                       struct libscols_cell *hdr = scols_column_get_header(cl);
-                       const char *name = scols_cell_get_data(hdr);
-
-                       if (i)
-                               fputc(',', stdout);
-                       fputs(name, stdout);
-                       i++;
-               }
-               fputc('\n', stdout);
-               scols_free_iter(itr);
-       }
        scols_print_table(ctl->outtab);
        scols_unref_table(ctl->outtab);
 }