#include #include "my-stuff.h" #include "../common/mondostructures.h" #include "../common/libmondo.h" #include "../mondorestore/mondorestore.h" #include "../mondorestore/mr-externs.h" extern void twenty_seconds_til_yikes(void); /* Reference to global bkpinfo */ struct s_bkpinfo *bkpinfo; extern bool g_text_mode; extern FILE *g_fprep; extern double g_kernel_version; extern int g_partition_table_locked_up; extern int g_noof_rows; bool g_ISO_restore_mode = FALSE; /* are we in Iso Mode? */ bool g_I_have_just_nuked = FALSE; char *g_isodir_device; char *g_isodir_format; char *g_biggielist_txt; char *g_filelist_full; char *g_filelist_imagedevs; char *g_imagedevs_restthese; char *g_mondo_cfg_file; char *g_mountlist_fname; char *g_mondo_home; char *g_getfacl; char *g_getfattr; extern char *MONDO_LOGFILE; extern int copy_from_src_to_dest(FILE * f_orig, FILE * f_archived, char direction); void main() { struct mountlist_itself *mountlist = NULL; struct raidlist_itself *raidlist; asprintf(&MONDO_LOGFILE,"/tmp/mrtest-mountlist.log"); g_loglevel = 99; g_text_mode = FALSE; if (!(mountlist = malloc(sizeof(struct mountlist_itself)))) { fatal_error("Cannot malloc mountlist"); } if (!(raidlist = malloc(sizeof(struct raidlist_itself)))) { fatal_error("Cannot malloc raidlist"); } malloc_libmondo_global_strings(); setup_newt_stuff(); asprintf(&g_mountlist_fname, "/tmp/mountlist.txt"); load_mountlist(mountlist, g_mountlist_fname); resize_mountlist_proportionately_to_suit_new_drives(mountlist); load_raidtab_into_raidlist(raidlist, RAIDTAB_FNAME); edit_mountlist(g_mountlist_fname, mountlist, raidlist); exit(0); }