| 39 | #define INTER_DISK_Y 18 |
| 40 | |
| 41 | int interface_check_hidden_ncurses(disk_t *disk, const int hpa_dco) |
| 42 | { |
| 43 | static const struct MenuItem menuHidden[]= |
| 44 | { |
| 45 | { 'C', "Continue", "Continue even if there is hidden data"}, |
| 46 | { 0,NULL,NULL} |
| 47 | }; |
| 48 | unsigned int menu=0; |
| 49 | int car; |
| 50 | int line=8; |
| 51 | aff_copy(stdscr); |
| 52 | wmove(stdscr,4,0); |
| 53 | wprintw(stdscr,"%s\n",disk->description_short(disk)); |
| 54 | wmove(stdscr,6,0); |
| 55 | wprintw(stdscr,"Hidden sectors are present."); |
| 56 | if(disk->sector_size!=0) |
| 57 | { |
| 58 | wmove(stdscr,line++,0); |
| 59 | wprintw(stdscr, "size %llu sectors\n", (long long unsigned)(disk->disk_real_size/disk->sector_size)); |
| 60 | } |
| 61 | if(disk->user_max!=0) |
| 62 | { |
| 63 | wmove(stdscr,line++,0); |
| 64 | wprintw(stdscr, "user_max %llu sectors\n", (long long unsigned)disk->user_max); |
| 65 | } |
| 66 | if(disk->native_max!=0) |
| 67 | { |
| 68 | wmove(stdscr,line++,0); |
| 69 | wprintw(stdscr, "native_max %llu sectors\n", (long long unsigned)(disk->native_max+1)); |
| 70 | } |
| 71 | if(disk->dco!=0) |
| 72 | { |
| 73 | wmove(stdscr,line++,0); |
| 74 | wprintw(stdscr, "dco %llu sectors\n", (long long unsigned)(disk->dco+1)); |
| 75 | } |
| 76 | if(hpa_dco&1) |
| 77 | { |
| 78 | wmove(stdscr,line++,0); |
| 79 | wprintw(stdscr, "Host Protected Area (HPA) present.\n"); |
| 80 | } |
| 81 | if(hpa_dco&2) |
| 82 | { |
| 83 | wmove(stdscr,line,0); |
| 84 | wprintw(stdscr, "Device Configuration Overlay (DCO) present.\n"); |
| 85 | } |
| 86 | car= wmenuSelect_ext(stdscr, 23, INTER_DISK_Y, INTER_DISK_X, menuHidden, 10, |
| 87 | "CQ", MENU_VERT | MENU_VERT_WARN | MENU_BUTTON, &menu,NULL); |
| 88 | if(car=='c' || car=='C') |
| 89 | return 0; |
| 90 | return 1; |
| 91 | } |
| 92 | #endif |
no test coverage detected