MCPcopy Create free account
hub / github.com/cgsecurity/testdisk / dir_partition

Function dir_partition

src/dirpart.c:95–232  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93}
94
95dir_partition_t dir_partition(disk_t *disk, const partition_t *partition, const int verbose, const int expert, char **current_cmd)
96{
97 dir_data_t dir_data;
98#ifdef HAVE_NCURSES
99 WINDOW *window;
100#endif
101 dir_partition_t res;
102 fflush(stderr);
103 dir_data.local_dir=NULL;
104 res=dir_partition_init(disk, partition, verbose, expert, &dir_data);
105#ifdef HAVE_NCURSES
106 window=newwin(LINES, COLS, 0, 0); /* full screen */
107 dir_data.display=window;
108 aff_copy(window);
109#else
110 dir_data.display=NULL;
111#endif
112 log_info("\n");
113 switch(res)
114 {
115 case DIR_PART_ENOIMP:
116 screen_buffer_reset();
117#ifdef HAVE_NCURSES
118 aff_copy(window);
119 wmove(window,4,0);
120 aff_part(window,AFF_PART_ORDER|AFF_PART_STATUS,disk,partition);
121#endif
122 log_partition(disk,partition);
123 screen_buffer_add("Support for this filesystem hasn't been implemented.\n");
124 screen_buffer_to_log();
125 if(current_cmd==NULL || *current_cmd==NULL)
126 {
127#ifdef HAVE_NCURSES
128 screen_buffer_display(window,"",NULL);
129#endif
130 }
131 break;
132 case DIR_PART_ENOSYS:
133 screen_buffer_reset();
134#ifdef HAVE_NCURSES
135 aff_copy(window);
136 wmove(window,4,0);
137 aff_part(window,AFF_PART_ORDER|AFF_PART_STATUS,disk,partition);
138#endif
139 log_partition(disk,partition);
140 screen_buffer_add("Support for this filesystem wasn't enabled during compilation.\n");
141 screen_buffer_to_log();
142 if(current_cmd==NULL || *current_cmd==NULL)
143 {
144#ifdef HAVE_NCURSES
145 screen_buffer_display(window,"",NULL);
146#endif
147 }
148 break;
149 case DIR_PART_EIO:
150 screen_buffer_reset();
151#ifdef HAVE_NCURSES
152 aff_copy(window);

Callers 9

ntfs_listFunction · 0.85
ntfs_boot_sectorFunction · 0.85
ask_structure_cliFunction · 0.85
ask_structure_ncursesFunction · 0.85
adv_menu_list_selectedFunction · 0.85
fat32_boot_sectorFunction · 0.85
fat1x_boot_sectorFunction · 0.85

Calls 15

dir_partition_initFunction · 0.85
screen_buffer_resetFunction · 0.85
aff_partFunction · 0.85
log_partitionFunction · 0.85
screen_buffer_addFunction · 0.85
screen_buffer_to_logFunction · 0.85
screen_buffer_displayFunction · 0.85
skip_comma_in_commandFunction · 0.85
check_commandFunction · 0.85
dir_whole_partition_logFunction · 0.85
dir_partition_affFunction · 0.85
dir_aff_logFunction · 0.85

Tested by

no test coverage detected