| 448 | } |
| 449 | |
| 450 | void interface_adv(disk_t *disk_car, const int verbose,const int dump_ind, const unsigned int expert, char**current_cmd) |
| 451 | { |
| 452 | int current_element_num=0; |
| 453 | #ifdef HAVE_NCURSES |
| 454 | int offset=0; |
| 455 | #endif |
| 456 | int rewrite=1; |
| 457 | unsigned int menu=0; |
| 458 | list_part_t *list_part; |
| 459 | list_part_t *current_element; |
| 460 | assert(current_cmd!=NULL); |
| 461 | log_info("\nInterface Advanced\n"); |
| 462 | list_part=disk_car->arch->read_part(disk_car,verbose,0); |
| 463 | /*@ assert valid_list_part(list_part); */ |
| 464 | current_element=list_part; |
| 465 | log_all_partitions(disk_car, list_part); |
| 466 | while(1) |
| 467 | { |
| 468 | int command; |
| 469 | #ifdef HAVE_NCURSES |
| 470 | static struct MenuItem menuAdv[]= |
| 471 | { |
| 472 | {'t',"Type","Change type, this setting will not be saved on disk"}, |
| 473 | {'b',"Boot","Boot sector recovery"}, |
| 474 | {'s',"Superblock",NULL}, |
| 475 | {'l',"List", "List and copy files"}, |
| 476 | {'u',"Undelete", "File undelete"}, |
| 477 | {'c',"Image Creation", "Create an image"}, |
| 478 | // {'a',"Add", "Add temporary partition (Expert only)"}, |
| 479 | {'q',"Quit","Return to main menu"}, |
| 480 | {0,NULL,NULL} |
| 481 | }; |
| 482 | const char *options; |
| 483 | int old_LINES=LINES; |
| 484 | interface_adv_ncurses(disk_car, rewrite, list_part, current_element, offset); |
| 485 | #endif |
| 486 | rewrite=0; |
| 487 | if(current_element==NULL) |
| 488 | { |
| 489 | #ifdef HAVE_NCURSES |
| 490 | options="q"; |
| 491 | #endif |
| 492 | } |
| 493 | else |
| 494 | { |
| 495 | if(menu==0 && (disk_car->arch!=&arch_none || current_element->part->upart_type!=UP_UNK)) |
| 496 | menu=1; |
| 497 | #ifdef HAVE_NCURSES |
| 498 | options=adv_get_options_for_partition(current_element->part); |
| 499 | menuAdv[2].desc=adv_get_boot_description(current_element->part); |
| 500 | #endif |
| 501 | } |
| 502 | if(*current_cmd!=NULL) |
| 503 | { |
| 504 | command=adv_string_to_command(current_cmd, ¤t_element, list_part); |
| 505 | } |
| 506 | else |
| 507 | { |
no test coverage detected