summaryrefslogtreecommitdiffstats
path: root/src/hiddenn.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/hiddenn.c
parent0718628ebaf1d05961aa804a91a0ecc4cd27a010 (diff)
Fix for HPA and DCO detection (again)
Diffstat (limited to 'src/hiddenn.c')
-rw-r--r--src/hiddenn.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/hiddenn.c b/src/hiddenn.c
index 5931fc0..066c9fb 100644
--- a/src/hiddenn.c
+++ b/src/hiddenn.c
@@ -34,7 +34,7 @@
#define INTER_DISK_X 0
#define INTER_DISK_Y 18
-int interface_check_hidden_ncurses(disk_t *disk)
+int interface_check_hidden_ncurses(disk_t *disk, const int hpa_dco)
{
static const struct MenuItem menuHidden[]=
{
@@ -69,13 +69,12 @@ int interface_check_hidden_ncurses(disk_t *disk)
wmove(stdscr,line++,0);
wprintw(stdscr, "dco %llu sectors\n", (long long unsigned)(disk->dco+1));
}
- if(disk->user_max > 0 && disk->user_max < disk->native_max+1)
+ if(hpa_dco&1)
{
- wmove(stdscr,line++,0);
- wprintw(stdscr, "Host Protected Area (HPA) present.\n");
+ wmove(stdscr,line++,0);
+ wprintw(stdscr, "Host Protected Area (HPA) present.\n");
}
- if((disk->native_max > 0 && disk->user_max < disk->native_max+1 && disk->native_max < disk->dco) ||
- (disk->user_max > 0 && disk->user_max < disk->dco+1))
+ if(hpa_dco&2)
{
wmove(stdscr,line,0);
wprintw(stdscr, "Device Configuration Overlay (DCO) present.\n");