Ignore:
Timestamp:
Aug 18, 2009, 3:20:42 PM (15 years ago)
Author:
Bruno Cornec
Message:

r3339@localhost: bruno | 2009-08-11 23:56:01 +0200
bkpinfo->kernel_path, bkpinfo->call_before_iso, bkpinfo->call_make_iso, bkpinfo->call_burn_iso, bkpinfo->call_after_iso and bkpinfo->postnuke_tarball are now dynamically allocated

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.10/mondo/src/common/libmondo-archive.c

    r2327 r2328  
    438438    copy_mondo_and_mindi_stuff_to_scratchdir(); // payload, too, if it exists
    439439#if __FreeBSD__ == 5
    440     strcpy(bkpinfo->kernel_path, "/boot/kernel/kernel");
     440    mr_asprintf(bkpinfo->kernel_path, "/boot/kernel/kernel");
    441441#elif __FreeBSD__ == 4
    442     strcpy(bkpinfo->kernel_path, "/kernel");
     442    mr_asprintf(bkpinfo->kernel_path, "/kernel");
    443443#elif linux
    444     if (figure_out_kernel_path_interactively_if_necessary
    445         (bkpinfo->kernel_path)) {
    446         fatal_error
    447             ("Kernel not found. Please specify manually with the '-k' switch.");
     444    if (figure_out_kernel_path_interactively_if_necessary(bkpinfo->kernel_path)) {
     445        fatal_error("Kernel not found. Please specify manually with the '-k' switch.");
    448446    }
    449447#else
     
    16611659    chdir(bkpinfo->scratchdir);
    16621660
    1663     if (bkpinfo->call_before_iso[0] != '\0') {
     1661    if (bkpinfo->call_before_iso) {
    16641662        mr_asprintf(message_to_screen, "Running pre-ISO call for CD#%d", g_current_media_number);
    16651663        res = eval_call_to_make_ISO(bkpinfo->call_before_iso, destfile, g_current_media_number, MONDO_LOGFILE, message_to_screen);
     
    16751673    }
    16761674
    1677     if (bkpinfo->call_make_iso[0] != '\0') {
     1675    if (bkpinfo->call_make_iso) {
    16781676        log_msg(2, "bkpinfo->call_make_iso = %s", bkpinfo->call_make_iso);
    16791677        mds = media_descriptor_string(bkpinfo->backup_media_type);
     
    17471745                }
    17481746                pause_for_N_seconds(5, "Letting DVD drive settle");
    1749                 res =
    1750                     eval_call_to_make_ISO(bkpinfo->call_make_iso, bkpinfo->scratchdir, g_current_media_number, MONDO_LOGFILE, message_to_screen);
     1747                res = eval_call_to_make_ISO(bkpinfo->call_make_iso, bkpinfo->scratchdir, g_current_media_number, MONDO_LOGFILE, message_to_screen);
    17511748                retval += res;
    17521749                if (!bkpinfo->please_dont_eject) {
     
    18461843    }
    18471844
    1848     if (bkpinfo->call_burn_iso[0] != '\0') {
     1845    if (bkpinfo->call_burn_iso) {
    18491846        log_msg(2, "bkpinfo->call_burn_iso = %s", bkpinfo->call_burn_iso);
    18501847        mds = media_descriptor_string(bkpinfo->backup_media_type);
     
    18521849        mr_free(mds);
    18531850        pause_and_ask_for_cdr(2, &cd_is_mountable);
    1854         res =
    1855             eval_call_to_make_ISO(bkpinfo->call_burn_iso,
    1856                                   destfile, g_current_media_number,
    1857                                   MONDO_LOGFILE, message_to_screen);
     1851        res = eval_call_to_make_ISO(bkpinfo->call_burn_iso, destfile, g_current_media_number, MONDO_LOGFILE, message_to_screen);
    18581852        if (res) {
    18591853            mr_strcat(message_to_screen, "...failed");
     
    18671861    }
    18681862
    1869     if (bkpinfo->call_after_iso[0] != '\0') {
     1863    if (bkpinfo->call_after_iso) {
    18701864        mds = media_descriptor_string(bkpinfo->backup_media_type);
    18711865        mr_asprintf(message_to_screen, "Running post-ISO call (%s #%d)", mds, g_current_media_number);
    18721866        mr_free(mds);
    1873         res =
    1874             eval_call_to_make_ISO(bkpinfo->call_after_iso,
    1875                                   destfile, g_current_media_number,
    1876                                   MONDO_LOGFILE, message_to_screen);
     1867        res = eval_call_to_make_ISO(bkpinfo->call_after_iso, destfile, g_current_media_number, MONDO_LOGFILE, message_to_screen);
    18771868        if (res) {
    18781869            mr_strcat(message_to_screen, "...failed");
Note: See TracChangeset for help on using the changeset viewer.