Ignore:
Timestamp:
Aug 18, 2009, 3:05:43 PM (11 years ago)
Author:
Bruno Cornec
Message:

r3334@localhost: bruno | 2009-08-08 12:17:37 +0200

  • Change mr_asprintf interface to pass only the char * (makes bkpinfo usage more easy)
File:
1 edited

Legend:

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

    r2322 r2323  
    209209
    210210    /* make sure PATH environmental variable allows access to mkfs, fdisk, etc. */
    211     mr_asprintf(&tmp1,"%s:/sbin:/usr/sbin:/usr/local/sbin",getenv("PATH"));
     211    mr_asprintf(tmp1,"%s:/sbin:/usr/sbin:/usr/local/sbin",getenv("PATH"));
    212212    setenv("PATH", tmp1, 1);
    213213    mr_free(tmp1);
    214214
    215215    /* Add the ARCH environment variable for ia64 purposes */
    216     mr_asprintf(&tmp1,"%s",get_architecture());
     216    mr_asprintf(tmp1,"%s",get_architecture());
    217217    setenv("ARCH", tmp1, 1);
    218218    mr_free(tmp1);
     
    352352        retval += res;
    353353        if (res) {
    354             mr_asprintf(&say_at_end, "Data archived. Please check the logs, just as a precaution. ");
    355         } else {
    356             mr_asprintf(&say_at_end, "Data archived OK. ");
     354            mr_asprintf(say_at_end, "Data archived. Please check the logs, just as a precaution. ");
     355        } else {
     356            mr_asprintf(say_at_end, "Data archived OK. ");
    357357        }
    358358    }
     
    362362        res = verify_data();
    363363        if (res < 0) {
    364             mr_asprintf(&tmp, "%d difference%c found.", -res,
     364            mr_asprintf(tmp, "%d difference%c found.", -res,
    365365                    (-res != 1) ? 's' : ' ');
    366             mr_asprintf(&say_at_end, "%s", tmp);
     366            mr_asprintf(say_at_end, "%s", tmp);
    367367            log_to_screen(tmp);
    368368            mr_free(tmp);
     
    402402        mr_free(say_at_end);
    403403    }
    404     mr_asprintf(&tmp, "umount %s/tmpfs", bkpinfo->tmpdir);
     404    mr_asprintf(tmp, "umount %s/tmpfs", bkpinfo->tmpdir);
    405405    run_program_and_log_output(tmp, TRUE);
    406406    mr_free(tmp);
    407407    if (bkpinfo->backup_media_type == usb) {
    408408        log_msg(1, "Unmounting USB device.");
    409         mr_asprintf(&tmp, "umount %s1", bkpinfo->media_device);
     409        mr_asprintf(tmp, "umount %s1", bkpinfo->media_device);
    410410        run_program_and_log_output(tmp, TRUE);
    411411        mr_free(tmp);
Note: See TracChangeset for help on using the changeset viewer.