Changeset 1137 in MondoRescue


Ignore:
Timestamp:
Feb 11, 2007, 2:38:01 PM (17 years ago)
Author:
Bruno Cornec
Message:

Always fixing typos

Location:
branches/stable/mondo/src
Files:
3 edited

Legend:

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

    r1136 r1137  
    17211721    char *message_to_screen;
    17221722    char *sz_blank_disk;
    1723     char *fnam;
    1724     char *tmp2;
    1725     char *tmp3;
     1723    char *tmp2 = NULL;
     1724    char *tmp3 = NULL;
    17261725    bool cd_is_mountable;
    17271726
     
    17301729    malloc_string(message_to_screen);
    17311730    malloc_string(sz_blank_disk);
    1732     malloc_string(fnam);
    17331731    tmp = mr_malloc(1200);
    1734     tmp2 = mr_malloc(1200);
    1735     tmp3 = mr_malloc(1200);
    17361732    assert(bkpinfo != NULL);
    17371733    assert_string_is_neither_NULL_nor_zerolength(destfile);
    17381734
    17391735    sprintf(tmp, "%s/isolinux.bin", bkpinfo->scratchdir);
    1740     sprintf(tmp2, "%s/isolinux.bin", bkpinfo->tmpdir);
     1736    mr_asprintf(&tmp2, "%s/isolinux.bin", bkpinfo->tmpdir);
    17411737    if (does_file_exist(tmp)) {
    1742         sprintf(tmp3, "cp -f %s %s", tmp, tmp2);
     1738        mr_asprintf(&tmp3, "cp -f %s %s", tmp, tmp2);
    17431739        paranoid_system(tmp3);
     1740        mr_free(tmp3);
    17441741    }
    17451742    if (!does_file_exist(tmp) && does_file_exist(tmp2)) {
    1746         sprintf(tmp3, "cp -f %s %s", tmp2, tmp);
     1743        mr_asprintf(&tmp3, "cp -f %s %s", tmp2, tmp);
    17471744        paranoid_system(tmp3);
    1748     }
    1749     /*
    1750        if (!does_file_exist(tmp))
    1751        {
    1752        mr_msg (2, "Silly bug in Mindi.pl; workaround in progress...");
    1753        strcpy(fnam, call_program_and_get_last_line_of_output("locate isolinux.bin | tail -n1"));
    1754        if (strlen(fnam)>0 && does_file_exist(fnam))
    1755        {
    1756        sprintf(tmp, "cp -f %s %s", fnam, bkpinfo->scratchdir);
    1757        res = run_program_and_log_output(tmp, FALSE);
    1758        }
    1759        else
    1760        {
    1761        res = 1;
    1762        }
    1763        if (res)
    1764        {
    1765        mr_msg (2, "Could not work around silly bug in Mindi.pl - sorry! Isolinux.bin missing");
    1766        }
    1767        }
    1768      */
     1745        mr_free(tmp3);
     1746    }
    17691747    mr_free(tmp2);
    1770     mr_free(tmp3);
    17711748    if (bkpinfo->backup_media_type == iso && bkpinfo->manual_cd_tray) {
    17721749        popup_and_OK(_("Please insert new media and press Enter."));
     
    19501927                mr_msg(1, "make_cd_use_lilo = FALSE");
    19511928                mr_msg(1, "Isolinux");
    1952                 res =
    1953                     eval_call_to_make_ISO(bkpinfo,
    1954                                           "mkisofs -no-emul-boot -b isolinux.bin -boot-load-size 4 -boot-info-table -c boot.cat -o '_ISO_' -J -r -p MondoRescue -publisher www.mondorescue.org -A Mondo_Rescue_GPL -V _CD#_ .",
    1955                                           destfile, g_current_media_number,
    1956                                           MONDO_LOGFILE,
    1957                                           message_to_screen);
     1929                res = eval_call_to_make_ISO(bkpinfo,
     1930                                            "mkisofs -no-emul-boot -b isolinux.bin -boot-load-size 4 -boot-info-table -c boot.cat -o '_ISO_' -J -r -p MondoRescue -publisher www.mondorescue.org -A Mondo_Rescue_GPL -V _CD#_ .",
     1931                                            destfile,
     1932                                            g_current_media_number,
     1933                                            MONDO_LOGFILE,
     1934                                            message_to_screen);
    19581935            }
    19591936        }
     
    20221999    mr_free(message_to_screen);
    20232000    mr_free(sz_blank_disk);
    2024     mr_free(fnam);
    2025     mr_free(tmp);
    20262001    return (retval);
    20272002}
     
    20332008    char *command;
    20342009    malloc_string(tmp);
    2035 
    2036     malloc_string(command);
    2037     sprintf(command,
    2038             "dd if=%s bs=512 count=1 2> /dev/null | strings | head -n1",
    2039             bigfile_fname);
     2010    bool ret = TRUE;
     2011    mr_asprintf(&command,
     2012             "dd if=%s bs=512 count=1 2> /dev/null | strings | head -n1",
     2013             bigfile_fname);
    20402014    mr_msg(1, "command = '%s'", command);
    20412015    strcpy(tmp, call_program_and_get_last_line_of_output(command));
    20422016    mr_msg(1, "--> tmp = '%s'", tmp);
     2017    mr_free(command);
    20432018    if (strstr(tmp, "NTFS")) {
    20442019        iamhere("TRUE");
    2045         return (TRUE);
    20462020    } else {
    20472021        iamhere("FALSE");
    2048         return (FALSE);
    2049     }
     2022        ret = FALSE;
     2023    }
     2024    return(ret);
    20502025}
    20512026
  • branches/stable/mondo/src/common/libmondo-files.c

    r1120 r1137  
    211211void exclude_nonexistent_files(char *inout)
    212212{
    213     char infname[MAX_STR_LEN];
    214     char outfname[MAX_STR_LEN];
    215     char tmp[MAX_STR_LEN];
    216     char incoming[MAX_STR_LEN];
     213    char *infname = NULL;
     214    char *outfname = NULL;
     215    char *tmp = NULL;
     216    char *incoming = NULL;
    217217
    218218    /*@ int ********************************************************* */
  • branches/stable/mondo/src/include/mr_file.h

    r1133 r1137  
    1919#define mr_fopen(x,y)           mr_fopen_int((const char *)x, (const char *)y,__LINE__,__FILE__)
    2020#define mr_fprintf(x,y,args...) mr_fprintf_int(x,__LINE__,__FILE__,y,## args)
    21 #define mr_fclose(x)            mr_fclose_int((FILE **)&fd, __LINE__,__FILE__)
    22 #define mr_mkdir(x)             mr_mkdir_int((const char *)pathname,(mode_t)mode,__LINE__,__FILE__)
     21#define mr_fclose(x)            mr_fclose_int((FILE **)&x, __LINE__,__FILE__)
     22#define mr_mkdir(x,y)           mr_mkdir_int((const char *)x,(mode_t)y,__LINE__,__FILE__)
    2323
    2424extern FILE *mr_fopen_int(const char *path, const char *mode,int line, char *file);
Note: See TracChangeset for help on using the changeset viewer.