Changeset 87 in MondoRescue for trunk/mondo/mondo/common/libmondo-archive.c


Ignore:
Timestamp:
Oct 27, 2005, 10:03:00 PM (18 years ago)
Author:
bcornec
Message:
  • Now use -Wall to compile
  • asprintf for newt-specific.c
  • Bug in libmondo-string.c line 1120: if we use %% in this format, then the percentage is printeed wrongly (after the real percentage we have a huge number)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/mondo/mondo/common/libmondo-archive.c

    r75 r87  
    22
    33subroutines to handle the archiving of files
    4 
    54*/
    65
     
    514513 * - @c media_size
    515514 * - @c nonbootable_backup
    516  * - @c scratchdir
    517515 * - @c tmpdir
    518516 * - @c use_lzo
     
    528526    /*@ buffer ************************************************************ */
    529527    char *tmp;
    530     char *scratchdir;
    531528    char *command;
    532529    char *use_lzo_sz;
     
    871868
    872869    //  popup_and_OK("Pausing");
    873 
    874870    res = run_program_and_log_to_screen(command,
    875871                                        "Generating boot+data disks");
     
    15081504                (misc_counter_that_is_not_important + 1) % 5;
    15091505            /* BERLIOS: media_usage_comment was NOT initialized !!! */
    1510             /* maybe : */
    1511             asprintf(&media_usage_comment, "%s",
    1512                      percent_media_full_comment(bkpinfo));
     1506            /* maybe  */
     1507            tmp = percent_media_full_comment(bkpinfo);
     1508            asprintf(&media_usage_comment, "%s", tmp);
     1509            paranoid_free(tmp);
    15131510            if (!misc_counter_that_is_not_important) {
    15141511                update_progress_form(media_usage_comment);
     
    15351532                sleep(5);
    15361533            }
    1537             asprintf(&media_usage_comment, "%s",
    1538                      percent_media_full_comment(bkpinfo));
     1534            tmp = percent_media_full_comment(bkpinfo);
     1535            asprintf(&media_usage_comment, "%s", tmp);
     1536            paranoid_free(tmp);
    15391537            /* copy to CD (scratchdir) ... and an actual CD-R if necessary */
    15401538            if (IS_THIS_A_STREAMING_BACKUP(bkpinfo->backup_media_type)) {
     
    16441642    char *message_to_screen;
    16451643    char *sz_blank_disk;
    1646     char *fnam;
    16471644    char *tmp2;
    16481645    char *tmp3;
     
    21862183        }
    21872184
    2188         asprintf(&media_usage_comment, "%s",
    2189                  percent_media_full_comment(bkpinfo));
     2185        tmp = percent_media_full_comment(bkpinfo);
     2186        asprintf(&media_usage_comment, "%s", tmp);
     2187        paranoid_free(tmp);
    21902188
    21912189        /* copy to CD (scratchdir) ... and an actual CD-R if necessary */
     
    31673165                             bkpinfo->tmpdir, suffix));
    31683166
    3169         asprintf(&tmp, "%s", percent_media_full_comment(bkpinfo));
     3167        tmp = percent_media_full_comment(bkpinfo);
    31703168        update_progress_form(tmp);
    31713169        paranoid_free(tmp);
     
    33803378    asprintf(&tmp, "Writing the final ISO");
    33813379    log_msg(2, tmp);
    3382     /* BERLIOS: that function seems strange to me
    3383        center_string(tmp, 80);
    3384      */
     3380    /* BERLIOS: center_string is now broken
     3381    center_string(tmp, 80);
     3382    */
    33853383#ifndef _XWIN
    33863384    if (!g_text_mode) {
Note: See TracChangeset for help on using the changeset viewer.