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

merge -r1082:1105 $SVN_M/branches/stable

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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
Note: See TracChangeset for help on using the changeset viewer.