summaryrefslogtreecommitdiffstats
path: root/src/tdisksel.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2011-03-05 18:59:26 +0100
committerChristophe Grenier <grenier@cgsecurity.org>2011-03-05 18:59:26 +0100
commit1554ea46e8846a4e9e061aa992be36764a6d1117 (patch)
tree9bbc4bd9e827116a77469a8dbf292cb8da782121 /src/tdisksel.c
parent0718628ebaf1d05961aa804a91a0ecc4cd27a010 (diff)
Fix for HPA and DCO detection (again)
Diffstat (limited to 'src/tdisksel.c')
-rw-r--r--src/tdisksel.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/tdisksel.c b/src/tdisksel.c
index 2cece52..e0e8da4 100644
--- a/src/tdisksel.c
+++ b/src/tdisksel.c
@@ -189,11 +189,12 @@ static int testdisk_disk_selection_ncurses(int verbose,int dump_ind, const list_
case 'O':
{
disk_t *disk=current_disk->disk;
+ const int hpa_dco=is_hpa_or_dco(disk);
autodetect_arch(disk);
autoset_unit(disk);
if(interface_check_disk_capacity(disk)==0 &&
interface_check_disk_access(disk, current_cmd)==0 &&
- (!is_hpa_or_dco(disk) || interface_check_hidden_ncurses(disk)==0) &&
+ (hpa_dco==0 || interface_check_hidden_ncurses(disk, hpa_dco)==0) &&
interface_partition_type(disk, verbose, current_cmd)==0)
{
if(menu_disk(disk, verbose, dump_ind, saveheader, current_cmd))