Ignore:
Timestamp:
Sep 20, 2013, 2:29:57 PM (11 years ago)
Author:
Bruno Cornec
Message:

Simplify the interface of mr_getline and mr_asprintf. With 3.1 compatibility now will allow backports from this branch into 3.0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.0/mondo/src/mondoarchive/mondoarchive.c

    r3141 r3185  
    206206
    207207    /* make sure PATH environmental variable allows access to mkfs, fdisk, etc. */
    208     mr_asprintf(&tmp1,"%s:/sbin:/usr/sbin:/usr/local/sbin",getenv("PATH"));
     208    mr_asprintf(tmp1,"%s:/sbin:/usr/sbin:/usr/local/sbin",getenv("PATH"));
    209209    setenv("PATH", tmp1, 1);
    210210    paranoid_free(tmp1);
    211211
    212212    /* Add the ARCH environment variable for ia64 purposes */
    213     mr_asprintf(&tmp1,"%s",get_architecture());
     213    mr_asprintf(tmp1,"%s",get_architecture());
    214214    setenv("ARCH", tmp1, 1);
    215215    paranoid_free(tmp1);
     
    382382        retval += res;
    383383        if (res) {
    384             mr_asprintf(&say_at_end, "Data archived. Please check the logs, just as a precaution. ");
    385         } else {
    386             mr_asprintf(&say_at_end, "Data archived OK. ");
     384            mr_asprintf(say_at_end, "Data archived. Please check the logs, just as a precaution. ");
     385        } else {
     386            mr_asprintf(say_at_end, "Data archived OK. ");
    387387        }
    388388    }
     
    392392        res = verify_data();
    393393        if (res < 0) {
    394             mr_asprintf(&tmp, "%d difference%c found.", -res,
     394            mr_asprintf(tmp, "%d difference%c found.", -res,
    395395                    (-res != 1) ? 's' : ' ');
    396             mr_asprintf(&say_at_end, "%s", tmp);
     396            mr_asprintf(say_at_end, "%s", tmp);
    397397            log_to_screen(tmp);
    398398            mr_free(tmp);
     
    432432        paranoid_free(say_at_end);
    433433    }
    434     mr_asprintf(&tmp, "umount %s/tmpfs", bkpinfo->tmpdir);
     434    mr_asprintf(tmp, "umount %s/tmpfs", bkpinfo->tmpdir);
    435435    run_program_and_log_output(tmp, TRUE);
    436436    mr_free(tmp);
    437437    if (bkpinfo->backup_media_type == usb) {
    438438        log_msg(1, "Unmounting USB device.");
    439         mr_asprintf(&tmp, "umount %s1", bkpinfo->media_device);
     439        mr_asprintf(tmp, "umount %s1", bkpinfo->media_device);
    440440        run_program_and_log_output(tmp, TRUE);
    441441        mr_free(tmp);
Note: See TracChangeset for help on using the changeset viewer.