Changeset 1106 in MondoRescue for trunk/mondo/src/mondorestore


Ignore:
Timestamp:
Feb 7, 2007, 11:55:11 PM (17 years ago)
Author:
Bruno Cornec
Message:

merge -r1082:1105 $SVN_M/branches/stable

Location:
trunk/mondo/src/mondorestore
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/mondo/src/mondorestore/mondo-prep.c

    r1086 r1106  
    20102010    system("clear");
    20112011    newtResume();
    2012     mr_free(drivelist);
     2012    mr_free((void*) drivelist);
    20132013    return (retval);
    20142014}
     
    26042604    }
    26052605    log_to_screen(_("Mountlist adjusted to suit current hard drive(s)"));
    2606     mr_free(drivelist);
     2606    mr_free((void*) drivelist);
    26072607}
    26082608
  • trunk/mondo/src/mondorestore/mondo-rstr-newt.c

    r1086 r1106  
    6767    /** int ****************************************************************/
    6868    int i = 0;
    69     int index = 0;
     69    int idx = 0;
    7070    int currline = 0;
    7171    int items = 0;
     
    103103            log_it("I don't know what this button does");
    104104        } else {
    105             index = find_next_free_index_in_disklist(disklist);
     105            idx = find_next_free_index_in_disklist(disklist);
    106106
    107107            items = disklist->entries;
    108108            strcpy(disklist->el[items].device,
    109109                   unallocated_raid_partitions->el[currline].device);
    110             disklist->el[items].index = index;
     110            disklist->el[items].index = idx;
    111111            disklist->entries = ++items;
    112112
     
    17331733        calculate_raid_device_size(mountlist, raidlist,
    17341734                                   raidrec->raid_device);
    1735     mr_free(bkp_raidrec);
     1735    mr_free((void*) bkp_raidrec);
    17361736#endif
    17371737}
     
    22592259
    22602260    /** int ***************************************************************/
    2261     int index = -1;
     2261    int idx = -1;
    22622262    int pos = 0;
    22632263
     
    22692269    for (done = FALSE; !done;) {
    22702270        for (pos = 0;
    2271              pos < disklist->entries && disklist->el[pos].index <= index;
     2271             pos < disklist->entries && disklist->el[pos].index <= idx;
    22722272             pos++);
    22732273        if (pos >= disklist->entries) {
    22742274            done = TRUE;
    22752275        } else {
    2276             index = disklist->el[pos].index;
    2277         }
    2278     }
    2279     return (index + 1);
     2276            idx = disklist->el[pos].index;
     2277        }
     2278    }
     2279    return (idx + 1);
    22802280}
    22812281
     
    23352335                char *isodir_path, bool nuke_me_please)
    23362336{
     2337    char *value = NULL;
    23372338
    23382339    /** initialize ********************************************************/
    2339 
    2340     // %d no var ???
    2341     // log_it("%d - AAA - isodir_path = %s", isodir_path);
     2340    malloc_string(value);
     2341
    23422342    if (isodir_device == NULL) {
    23432343        mr_asprintf(&isodir_device, "/dev/");
     
    23462346        mr_asprintf(&isodir_path, "/");
    23472347    }
    2348     if (does_file_exist("/tmp/NFS-SERVER-PATH")) {
    2349         mr_free(isodir_device);
    2350         isodir_device = last_line_of_file("/tmp/NFS-SERVER-MOUNT");
     2348    if (read_cfg_var(g_mondo_cfg_file, "nfs-server-path", value) == 0) {
     2349        read_cfg_var(g_mondo_cfg_file, "nfs-server-mount", isodir_device);
     2350        mr_free(isodir_format);
    23512351        mr_asprintf(&isodir_format, "nfs");
    23522352        mr_free(isodir_path);
    2353         isodir_path = last_line_of_file("/tmp/NFS-SERVER-PATH");
    2354     }
     2353        mr_asprintf(isodir_path, value);
     2354    }
     2355    mr_free(value);
     2356
    23552357    if (nuke_me_please) {
    23562358        return (TRUE);
     
    24512453 * Dummy function that proves that we can get to the point where Mondo is run.
    24522454 */
    2453 void nuke_mode_dummy()
     2455void nuke_mode_dummy(void)
    24542456{
    24552457
     
    29122914               sizeof(struct list_of_disks));
    29132915    }
    2914     mr_free(bkp_raidrec);
    2915     mr_free(bkp_disklist);
    2916     mr_free(bkp_raidlist);
    2917     mr_free(unallocated_raid_partitions);
     2916    mr_free((void*) bkp_raidrec);
     2917    mr_free((void*) bkp_disklist);
     2918    mr_free((void*) bkp_raidlist);
     2919    mr_free((void*) unallocated_raid_partitions);
    29182920}
    29192921#endif
  • trunk/mondo/src/mondorestore/mondo-rstr-newt.h

    r783 r1106  
    120120char *mountlist_entry_to_string(struct mountlist_itself *, int);
    121121void mvaddstr_and_log_it(int, int, char *);
    122 void nuke_mode_dummy();
     122void nuke_mode_dummy(void);
    123123char *number_of_disks_as_string(int, char *);
    124124void open_evalcall_form(char *);
  • trunk/mondo/src/mondorestore/mondo-rstr-tools-EXT.h

    r914 r1106  
    33**/
    44
    5 extern void free_MR_global_filenames();
     5extern void free_MR_global_filenames(void);
    66extern void get_cfg_file_from_archive_or_bust(struct s_bkpinfo *);
    77extern bool is_file_in_list(char *, char *, char *);    /* needle, haystack, preamble */
  • trunk/mondo/src/mondorestore/mondo-rstr-tools.c

    r1086 r1106  
    5555 * Free the malloc()s for the filename variables.
    5656 */
    57 void free_MR_global_filenames()
     57void free_MR_global_filenames(void)
    5858{
    5959    mr_free(g_biggielist_txt);
     
    537537
    538538    assert(p_external_copy_of_mountlist != NULL);
    539     mountlist = mr_malloc(sizeof(struct mountlist_itself));
     539    mountlist = (struct mountlist_itself *)mr_malloc(sizeof(struct mountlist_itself));
    540540    memcpy((void *) mountlist, (void *) p_external_copy_of_mountlist,
    541541           sizeof(struct mountlist_itself));
     
    620620    }
    621621    run_program_and_log_output("df -m", 3);
    622     mr_free(mountlist);
     622    mr_free((void*) mountlist);
    623623    return (retval);
    624624}
     
    918918
    919919    read_cfg_var(cfg_file, "acl", value);
    920     if (strstr(value, "TRUE")) {
     920    if (strstr(value, "yes")) {
    921921        mr_asprintf(&g_getfacl,"setfacl");
    922922        mr_msg(1, "We will restore ACLs");
     
    926926    }
    927927    read_cfg_var(cfg_file, "xattr", value);
    928     if (strstr(value, "TRUE")) {
     928    if (strstr(value, "yes")) {
    929929        mr_asprintf(&g_getfattr,"setfattr");
    930930        mr_msg(1, "We will restore XATTRs");
     
    20272027    assert(p_external_copy_of_mountlist != NULL);
    20282028
    2029     mountlist = mr_malloc(sizeof(struct mountlist_itself));
     2029    mountlist = (struct mountlist_itself *)mr_malloc(sizeof(struct mountlist_itself));
    20302030    memcpy((void *) mountlist, (void *) p_external_copy_of_mountlist,
    20312031           sizeof(struct mountlist_itself));
     
    21202120        log_to_screen(_("All partitions were unmounted OK."));
    21212121    }
    2122     mr_free(mountlist);
     2122    mr_free((void*) mountlist);
    21232123    return (retval);
    21242124}
     
    24412441    char *screen_message = NULL;
    24422442
    2443     raidlist = mr_malloc(sizeof(struct raidlist_itself));
     2443    raidlist = (struct raidlist_itself *)mr_malloc(sizeof(struct raidlist_itself));
    24442444
    24452445    assert(wait_for_percentage <= 100);
     
    24792479        }
    24802480    }
    2481     mr_free(raidlist);
    2482 }
     2481    mr_free((void*) raidlist);
     2482}
  • trunk/mondo/src/mondorestore/mondo-rstr-tools.h

    r1079 r1106  
    33**/
    44
    5 void free_global_filenames();
     5void free_global_filenames(void);
    66void get_cfg_file_from_archive_or_bust(struct s_bkpinfo *);
    77bool is_file_in_list(char *, char *, char *);   /* needle, haystack, preamble */
Note: See TracChangeset for help on using the changeset viewer.