summaryrefslogtreecommitdiffstats
path: root/src/thfs.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2009-01-14 22:13:47 +0100
committerChristophe Grenier <grenier@cgsecurity.org>2009-01-14 22:13:47 +0100
commit1650fe5b8b6cea638c280df13605aea816718a00 (patch)
treefed11bd9361236aba47157d859607c109db05814 /src/thfs.c
parent56e1c29b2c0614b0b3230946d72e1eaf37618bcc (diff)
Split ncurses text interface from functions
Diffstat (limited to 'src/thfs.c')
-rw-r--r--src/thfs.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/thfs.c b/src/thfs.c
index 4d0485e..f5f047a 100644
--- a/src/thfs.c
+++ b/src/thfs.c
@@ -22,7 +22,8 @@
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
-
+
+#include <stdio.h>
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
@@ -38,6 +39,7 @@
#include "hfs.h"
#include "hfsp.h"
#include "log.h"
+#include "log_part.h"
#include "thfs.h"
#ifdef HAVE_NCURSES
@@ -214,6 +216,7 @@ int HFS_HFSP_boot_sector(disk_t *disk_car, partition_t *partition, const int ver
free(buffer_backup_bs);
return 0;
case 'O': /* O : copy original superblock over backup boot */
+#ifdef HAVE_NCURSES
if(ask_confirmation("Copy original HFS/HFS+ volume header over backup, confirm ? (Y/N)")!=0)
{
log_info("copy original superblock over backup boot\n");
@@ -224,8 +227,10 @@ int HFS_HFSP_boot_sector(disk_t *disk_car, partition_t *partition, const int ver
disk_car->sync(disk_car);
rescan=1;
}
+#endif
break;
case 'B': /* B : copy backup superblock over main superblock */
+#ifdef HAVE_NCURSES
if(ask_confirmation("Copy backup HFS/HFS+ volume header over main volume header, confirm ? (Y/N)")!=0)
{
log_info("copy backup superblock over main superblock\n");
@@ -236,6 +241,7 @@ int HFS_HFSP_boot_sector(disk_t *disk_car, partition_t *partition, const int ver
disk_car->sync(disk_car);
rescan=1;
}
+#endif
break;
case 'D':
hfs_dump(disk_car, partition, buffer_bs, buffer_backup_bs);