Fix printing in perf preference panel
[lttngtop.git] / src / cursesdisplay.c
index 042d45a6feb6bfbfa7a0962f935fd0b1509d8a50..acf5753008490925b019c3241838e8c63e2d9d3d 100644 (file)
@@ -448,13 +448,20 @@ void update_process_details()
        print_key_title("WRITE B/s", 7);
        wprintw(center, "%d", tmp->filewrite);
 
+       wattron(center, A_BOLD);
+       mvwprintw(center, 8, 1, "FD");
+       mvwprintw(center, 8, 12, "READ");
+       mvwprintw(center, 8, 22, "WRITE");
+       mvwprintw(center, 8, 32, "FILENAME");
+       wattroff(center, A_BOLD);
+
        for (i = 0; i < tmp->process_files_table->len; i++) {
                file_tmp = get_file(tmp, i);
                if (file_tmp != NULL) {
-                       print_key_title("file", 8+j);
-                       wprintw(center, "%s fd = %d", file_tmp->name, i);
-                       wprintw(center, " read = %d", file_tmp->read);
-                       wprintw(center, " write = %d", file_tmp->write);
+                       mvwprintw(center, 9 + j, 1, "%d", i);
+                       mvwprintw(center, 9 + j, 12, "%d", file_tmp->read);
+                       mvwprintw(center, 9 + j, 22, "%d", file_tmp->write);
+                       mvwprintw(center, 9 + j, 32, "%s", file_tmp->name);
                        j++;
                }
        }
@@ -715,7 +722,7 @@ void update_perf_panel(int line_selected, int toggle_view, int toggle_sort)
                        wattron(perf_panel_window, A_BOLD);
                mvwprintw(perf_panel_window, i + 1, 1, "[%c] %s",
                                perf->visible == 1 ? 'x' : ' ',
-                               (char *) perflist->data + 6);
+                               (char *) perflist->data + 5);
                wattroff(perf_panel_window, A_BOLD);
                wattroff(perf_panel_window, COLOR_PAIR(5));
                i++;
This page took 0.030852 seconds and 4 git commands to generate.