| 193 | } |
| 194 | |
| 195 | list_part_t *interface_load(disk_t *disk_car,list_part_t *list_part, const int verbose) |
| 196 | { |
| 197 | struct td_list_head *backup_walker=NULL; |
| 198 | struct td_list_head *backup_current=NULL; |
| 199 | backup_disk_t *backup_list=partition_load(disk_car,verbose); |
| 200 | log_info("interface_load\n"); |
| 201 | td_list_for_each(backup_walker,&backup_list->list) |
| 202 | { |
| 203 | backup_disk_t *backup; |
| 204 | backup=td_list_entry(backup_walker, backup_disk_t, list); |
| 205 | log_info("%s %s",backup->description,ctime(&backup->my_time)); |
| 206 | log_all_partitions(disk_car, backup->list_part); |
| 207 | } |
| 208 | #ifdef HAVE_NCURSES |
| 209 | backup_current=interface_load_ncurses(disk_car, backup_list); |
| 210 | #endif |
| 211 | if(backup_current!=NULL) |
| 212 | { |
| 213 | list_part_t *partition; |
| 214 | backup_disk_t *backup; |
| 215 | backup=td_list_entry(backup_current, backup_disk_t, list); |
| 216 | for(partition=backup->list_part;partition!=NULL;partition=partition->next) |
| 217 | { |
| 218 | /* Check partition and load partition name */ |
| 219 | disk_car->arch->check_part(disk_car,verbose,partition->part,0); |
| 220 | } |
| 221 | list_part=merge_partition_list(list_part, backup->list_part); |
| 222 | } |
| 223 | { /* Cleanup */ |
| 224 | struct td_list_head *backup_walker_next = NULL; |
| 225 | td_list_for_each_safe(backup_walker,backup_walker_next,&backup_list->list) |
| 226 | { |
| 227 | backup_disk_t *backup; |
| 228 | backup=td_list_entry(backup_walker, backup_disk_t, list); |
| 229 | part_free_list(backup->list_part); |
| 230 | free(backup); |
| 231 | } |
| 232 | free(backup_list); |
| 233 | } |
| 234 | return list_part; |
| 235 | } |
| 236 | #endif |
no test coverage detected