summaryrefslogtreecommitdiffstats
path: root/src/fat32.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/fat32.c
parent56e1c29b2c0614b0b3230946d72e1eaf37618bcc (diff)
Split ncurses text interface from functions
Diffstat (limited to 'src/fat32.c')
-rw-r--r--src/fat32.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/fat32.c b/src/fat32.c
index d06582f..b83da0f 100644
--- a/src/fat32.c
+++ b/src/fat32.c
@@ -23,6 +23,7 @@
#include <config.h>
#endif
+#include <stdio.h>
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
@@ -39,6 +40,7 @@
#include "fat.h"
#include "io_redir.h"
#include "log.h"
+#include "log_part.h"
#include "fat_adv.h"
#include "fat32.h"
@@ -262,6 +264,7 @@ int fat32_boot_sector(disk_t *disk_car, partition_t *partition, const int verbos
free(buffer_backup_bs);
return 0;
case 'O': /* O : copy original boot sector over backup boot */
+#ifdef HAVE_NCURSES
if(ask_confirmation("Copy original FAT32 boot sector over backup boot, confirm ? (Y/N)")!=0)
{
log_info("copy original boot sector over backup boot\n");
@@ -272,8 +275,10 @@ int fat32_boot_sector(disk_t *disk_car, partition_t *partition, const int verbos
disk_car->sync(disk_car);
rescan=1;
}
+#endif
break;
case 'B': /* B : copy backup boot sector over boot sector */
+#ifdef HAVE_NCURSES
if(ask_confirmation("Copy backup FAT32 boot sector over boot sector, confirm ? (Y/N)")!=0)
{
log_info("copy backup boot sector over boot sector\n");
@@ -284,6 +289,7 @@ int fat32_boot_sector(disk_t *disk_car, partition_t *partition, const int verbos
disk_car->sync(disk_car);
rescan=1;
}
+#endif
break;
case 'C':
repair_FAT_table(disk_car,partition,verbose);