Changeset 2204 in MondoRescue for branches/2.2.9/mondo/test/test-mountlist.c


Ignore:
Timestamp:
May 13, 2009, 12:26:33 PM (15 years ago)
Author:
Bruno Cornec
Message:

First set of improvements for mountlist management (test with valgrind). Fix errors on scanf usage. More to come.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.9/mondo/test/test-mountlist.c

    r2202 r2204  
    44#include "../common/libmondo.h"
    55#include "../mondorestore/mondorestore.h"
     6#include "../mondorestore/mr-externs.h"
    67
    78extern void twenty_seconds_til_yikes(void);
     
    3435
    3536extern char *MONDO_LOGFILE;
    36 
    37 void free_MR_global_filenames(void) {
    38 }
    39 
    4037extern int copy_from_src_to_dest(FILE * f_orig, FILE * f_archived,
    4138                                 char direction);
     
    4441
    4542    struct mountlist_itself *mountlist = NULL;
     43    struct raidlist_itself *raidlist;
     44
    4645    asprintf(&MONDO_LOGFILE,"/tmp/mrtest-mountlist.log");
    4746
     
    5150        fatal_error("Cannot malloc mountlist");
    5251    }
     52    if (!(raidlist = malloc(sizeof(struct raidlist_itself)))) {
     53        fatal_error("Cannot malloc raidlist");
     54    }
    5355    malloc_libmondo_global_strings();
    5456
     
    5658asprintf(&g_mountlist_fname, "/tmp/mountlist.txt");
    5759load_mountlist(mountlist, g_mountlist_fname);
    58 finish(0);
     60resize_mountlist_proportionately_to_suit_new_drives(mountlist);
     61load_raidtab_into_raidlist(raidlist, RAIDTAB_FNAME);
     62edit_mountlist(g_mountlist_fname, mountlist, raidlist);
     63exit(0);
    5964}
Note: See TracChangeset for help on using the changeset viewer.