| 39 | #define INTER_DISK_Y 7 |
| 40 | |
| 41 | int write_clean_table(disk_t *disk_car) |
| 42 | { |
| 43 | aff_copy(stdscr); |
| 44 | wmove(stdscr,5,0); |
| 45 | wprintw(stdscr,"%s\n",disk_car->description(disk_car)); |
| 46 | wmove(stdscr,INTER_DISK_Y,INTER_DISK_X); |
| 47 | if(disk_car->arch->erase_list_part==NULL) |
| 48 | { |
| 49 | display_message("Partition table clearing is not implemented for this partition type.\n"); |
| 50 | return 1; |
| 51 | } |
| 52 | wprintw(stdscr,msg_WRITE_CLEAN_TABLE); |
| 53 | if(ask_YN(stdscr)!=0 && ask_confirmation("Clear partition table, confirm ? (Y/N)")!=0) |
| 54 | { |
| 55 | if(disk_car->arch->erase_list_part(disk_car)) |
| 56 | { |
| 57 | display_message("Write error: Can't clear partition table.\n"); |
| 58 | return 2; |
| 59 | } |
| 60 | else |
| 61 | display_message("Partition table has been cleared.\nYou have to reboot for the change to take effect.\n"); |
| 62 | } |
| 63 | return 0; |
| 64 | } |
| 65 | #else |
| 66 | int write_clean_table(disk_t *disk_car) |
| 67 | { |
no test coverage detected