Changeset 2234 in MondoRescue for branches/2.2.9/mondo


Ignore:
Timestamp:
Jun 19, 2009, 6:04:22 PM (15 years ago)
Author:
Bruno Cornec
Message:

r3128@localhost: bruno | 2009-06-18 20:21:37 +0200

  • test mountlist now goes up to calling evaluate_mountlist
File:
1 edited

Legend:

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

    r2211 r2234  
    4848void main() {
    4949
    50     struct mountlist_itself *mountlist = NULL;
    51     struct raidlist_itself *raidlist;
     50struct mountlist_itself *mountlist = NULL;
     51struct raidlist_itself *raidlist;
     52char *tmpA = NULL;
     53char *tmpB = NULL;
     54char *tmpC = NULL;
     55bool ret = FALSE;
    5256
    53     mr_asprintf(&MONDO_LOGFILE,"/tmp/mrtest-mountlist.log");
     57mr_asprintf(&MONDO_LOGFILE,"/tmp/mrtest-mountlist.log");
    5458
    55     /* Globals */
    56     g_loglevel = 99;
    57     g_text_mode = FALSE;
    58     g_main_pid = getpid();
     59/* Globals */
     60g_loglevel = 99;
     61g_text_mode = FALSE;
     62g_main_pid = getpid();
    5963
    60     if (!(mountlist = malloc(sizeof(struct mountlist_itself)))) {
    61         fatal_error("Cannot malloc mountlist");
    62     }
    63     if (!(raidlist = malloc(sizeof(struct raidlist_itself)))) {
    64         fatal_error("Cannot malloc raidlist");
    65     }
    66     malloc_libmondo_global_strings();
     64if (!(mountlist = malloc(sizeof(struct mountlist_itself)))) {
     65    fatal_error("Cannot malloc mountlist");
     66}
     67if (!(raidlist = malloc(sizeof(struct raidlist_itself)))) {
     68    fatal_error("Cannot malloc raidlist");
     69}
     70malloc_libmondo_global_strings();
    6771
    6872setup_newt_stuff();
     
    7781edit_mountlist(g_mountlist_fname, mountlist, raidlist);
    7882log_it("after edit_mountlist");
     83
     84mr_asprintf(&tmpA, "%s", "         ");
     85mr_asprintf(&tmpB, "%s", "         ");
     86mr_asprintf(&tmpC, "%s", "         ");
     87ret = evaluate_mountlist(mountlist, tmpA, tmpB, tmpC);
     88log_it("after evaluate_mountlist");
    7989exit(0);
    8090}
Note: See TracChangeset for help on using the changeset viewer.