Changeset 2296 in MondoRescue for branches/2.2.10/mondo/src/common


Ignore:
Timestamp:
Jul 23, 2009, 2:53:30 PM (15 years ago)
Author:
Bruno Cornec
Message:
  • Replace sprintf by mr_asprintf in mondo-rstr-compare.c
  • All mr_asprintf call should be on one line (for quality script) and use a string as second param
  • Improve quality script
Location:
branches/2.2.10/mondo/src/common
Files:
11 edited

Legend:

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

    r2291 r2296  
    350350    paranoid_free(command);
    351351
    352     mr_asprintf(&command, "afio -o -b %ld -M 16m %s %s < %s 2>> %s",
    353             TAPE_BLOCK_SIZE, zipparams, fname, filelist, MONDO_LOGFILE);
     352    mr_asprintf(&command, "afio -o -b %ld -M 16m %s %s < %s 2>> %s", TAPE_BLOCK_SIZE, zipparams, fname, filelist, MONDO_LOGFILE);
    354353    paranoid_free(zipparams);
    355354
     
    867866    log_msg(1, "lines_in_filelist = %ld", lines_in_filelist);
    868867
    869     mr_asprintf(&command,
    870 /*     "mindi --custom 2=%s 3=%s/images 4=\"%s\" 5=\"%s\" \
     868/*     "mindi 1=%s --custom 2=%s 3=%s/images 4=\"%s\" 5=\"%s\" \
    8718696=\"%s\" 7=%ld 8=\"%s\" 9=\"%s\" 10=\"%s\" \
    87287011=\"%s\" 12=%s 13=%ld 14=\"%s\" 15=\"%s\" 16=\"%s\" 17=\"%s\" 18=%ld 19=%d",*/
    873             "mindi %s --custom %s %s/images '%s' '%s' \
     871    mr_asprintf(&command, "mindi %s --custom %s %s/images '%s' '%s' \
    874872'%s' %ld '%s' '%s' '%s' \
    875873'%s' %s %ld '%s' '%s' '%s' '%s' %ld %d '%s'", tmp2, bkpinfo->tmpdir,    // parameter #2
     
    10761074                this_thread_no, archiving_set_no);
    10771075        if (g_getfattr) {
    1078             mr_asprintf(&curr_xattr_list_fname, XATTR_LIST_FNAME_RAW_SZ,
    1079                 bkpinfo->tmpdir, archiving_set_no);
     1076            mr_asprintf(&curr_xattr_list_fname, XATTR_LIST_FNAME_RAW_SZ, bkpinfo->tmpdir, archiving_set_no);
    10801077            get_fattr_list(archiving_filelist_fname, curr_xattr_list_fname);
    10811078            mr_free(curr_xattr_list_fname);
    10821079        }
    10831080        if (g_getfacl) {
    1084             mr_asprintf(&curr_acl_list_fname, ACL_LIST_FNAME_RAW_SZ,
    1085                 bkpinfo->tmpdir, archiving_set_no);
     1081            mr_asprintf(&curr_acl_list_fname, ACL_LIST_FNAME_RAW_SZ, bkpinfo->tmpdir, archiving_set_no);
    10861082            get_acl_list(archiving_filelist_fname, curr_acl_list_fname);
    10871083            mr_free(curr_acl_list_fname);
     
    10971093
    10981094        if (res) {
    1099             mr_asprintf(&tmp,
    1100                     "Errors occurred while archiving set %ld. Please review logs.",
    1101                     archiving_set_no);
     1095            mr_asprintf(&tmp, "Errors occurred while archiving set %ld. Please review logs.", archiving_set_no);
    11021096            log_to_screen(tmp);
    11031097            mr_free(tmp);
     
    14271421            } else {
    14281422                // store set N
    1429                 mr_asprintf(&storing_filelist_fname, FILELIST_FNAME_RAW_SZ,
    1430                         bkpinfo->tmpdir, storing_set_no);
    1431                 mr_asprintf(&storing_afioball_fname, AFIOBALL_FNAME_RAW_SZ,
    1432                         bkpinfo->tmpdir, storing_set_no, bkpinfo->zip_suffix);
     1423                mr_asprintf(&storing_filelist_fname, FILELIST_FNAME_RAW_SZ, bkpinfo->tmpdir, storing_set_no);
     1424                mr_asprintf(&storing_afioball_fname, AFIOBALL_FNAME_RAW_SZ, bkpinfo->tmpdir, storing_set_no, bkpinfo->zip_suffix);
    14331425                if (g_getfattr) {
    1434                     mr_asprintf(&curr_xattr_list_fname, XATTR_LIST_FNAME_RAW_SZ,
    1435                         bkpinfo->tmpdir, storing_set_no);
     1426                    mr_asprintf(&curr_xattr_list_fname, XATTR_LIST_FNAME_RAW_SZ, bkpinfo->tmpdir, storing_set_no);
    14361427                }
    14371428                if (g_getfacl) {
    1438                     mr_asprintf(&curr_acl_list_fname, ACL_LIST_FNAME_RAW_SZ,
    1439                         bkpinfo->tmpdir, storing_set_no);
     1429                    mr_asprintf(&curr_acl_list_fname, ACL_LIST_FNAME_RAW_SZ, bkpinfo->tmpdir, storing_set_no);
    14401430                }
    14411431
     
    14911481                mr_free(media_usage_comment);
    14921482                if (res) {
    1493                     mr_asprintf(&tmp, "Failed to add archive %ld's files to CD dir\n",
    1494                         storing_set_no);
     1483                    mr_asprintf(&tmp, "Failed to add archive %ld's files to CD dir\n", storing_set_no);
    14951484                    log_to_screen(tmp);
    14961485                    paranoid_free(tmp);
     
    17171706
    17181707    if (bkpinfo->call_before_iso[0] != '\0') {
    1719         mr_asprintf(&message_to_screen, "Running pre-ISO call for CD#%d",
    1720                 g_current_media_number);
     1708        mr_asprintf(&message_to_screen, "Running pre-ISO call for CD#%d", g_current_media_number);
    17211709        res =
    17221710            eval_call_to_make_ISO(bkpinfo->call_before_iso,
     
    17631751            retval += res;
    17641752#ifdef DVDRWFORMAT
    1765             mr_asprintf(&tmp,
    1766                     "tail -n8 %s | grep 'blank=full.*dvd-compat.*DAO'",
    1767                     MONDO_LOGFILE);
     1753            mr_asprintf(&tmp, "tail -n8 %s | grep 'blank=full.*dvd-compat.*DAO'", MONDO_LOGFILE);
    17681754            if (g_backup_media_type == dvd
    17691755                && (res || !run_program_and_log_output(tmp, 1))) {
     
    20892075                        "Calling ntfsclone in background because %s is an NTFS partition",
    20902076                        bigfile_fname);
    2091                 mr_asprintf(&sz_devfile, "%s/%d.%d.000", bkpinfo->tmpdir,
    2092                         (int) (random() % 32768),
    2093                         (int) (random() % 32768));
     2077                mr_asprintf(&sz_devfile, "%s/%d.%d.000", bkpinfo->tmpdir, (int) (random() % 32768), (int) (random() % 32768));
    20942078                mkfifo(sz_devfile, 0x770);
    20952079                ntfsprog_fifo = sz_devfile;
     
    27742758            mr_asprintf(&tmp, "cat %s 2> /dev/null", szserfname);
    27752759            mr_free(our_serial_str);
    2776             mr_asprintf(&our_serial_str, "%s",
    2777                    call_program_and_get_last_line_of_output(tmp));
     2760            mr_asprintf(&our_serial_str, "%s", call_program_and_get_last_line_of_output(tmp));
    27782761            mr_free(tmp);
    27792762            // FIXME - should be able to use last_line_of_file(), surely?
     
    28122795        eject_device(cdrom_dev);
    28132796        mds = media_descriptor_string(g_backup_media_type);
    2814         mr_asprintf(&tmp, "I am about to burn %s #%d of the backup set. Please insert %s and press Enter.",
    2815                 mds, g_current_media_number, mds);
     2797        mr_asprintf(&tmp, "I am about to burn %s #%d of the backup set. Please insert %s and press Enter.", mds, g_current_media_number, mds);
    28162798        mr_free(mds);
    28172799
     
    31143096                mr_asprintf(&tmp, "Problem with slice # %ld", slice_num);
    31153097            } else {
    3116                 mr_asprintf(&tmp, "%s - Bigfile #%ld, slice #%ld compressed OK          ", biggie_filename, biggie_file_number + 1,
    3117                         slice_num);
     3098                mr_asprintf(&tmp, "%s - Bigfile #%ld, slice #%ld compressed OK          ", biggie_filename, biggie_file_number + 1, slice_num);
    31183099            }
    31193100#ifndef _XWIN
     
    33513332    if (space_occupied_by_cd(bkpinfo->scratchdir) / 1024 >
    33523333        bkpinfo->media_size[g_current_media_number]) {
    3353         mr_asprintf(&tmp1,
    3354                 "Warning! CD is too big. It occupies %ld KB, which is more than the %ld KB allowed.",
    3355                 (long) space_occupied_by_cd(bkpinfo->scratchdir),
     3334        mr_asprintf(&tmp1, "Warning! CD is too big. It occupies %ld KB, which is more than the %ld KB allowed.", (long) space_occupied_by_cd(bkpinfo->scratchdir),
    33563335                (long) bkpinfo->media_size[g_current_media_number]);
    33573336        log_to_screen(tmp1);
    33583337        mr_free(tmp1);
    33593338    }
    3360     mr_asprintf(&isofile, "%s/%s/%s-%d.iso", bkpinfo->isodir,
    3361             bkpinfo->nfs_remote_dir, bkpinfo->prefix,
    3362             g_current_media_number);
     3339    mr_asprintf(&isofile, "%s/%s/%s-%d.iso", bkpinfo->isodir, bkpinfo->nfs_remote_dir, bkpinfo->prefix, g_current_media_number);
    33633340    for (that_one_was_ok = FALSE; !that_one_was_ok;) {
    33643341        if (bkpinfo->backup_media_type != usb) {
     
    34213398    }
    34223399    wipe_archives(bkpinfo->scratchdir);
    3423     mr_asprintf(&tmp1, "rm -Rf %s/images/*gz %s/images/*data*img",
    3424             bkpinfo->scratchdir, bkpinfo->scratchdir);
     3400    mr_asprintf(&tmp1, "rm -Rf %s/images/*gz %s/images/*data*img", bkpinfo->scratchdir, bkpinfo->scratchdir);
    34253401    if (system(tmp1)) {
    34263402        log_msg
  • branches/2.2.10/mondo/src/common/libmondo-cli.c

    r2291 r2296  
    901901        }
    902902        flag_set['d'] = TRUE;
    903         mr_asprintf(&tmp1,
    904                 "You didn't specify a tape streamer device. I'm assuming %s",
    905                 flag_val['d']);
     903        mr_asprintf(&tmp1, "You didn't specify a tape streamer device. I'm assuming %s", flag_val['d']);
    906904        log_to_screen(tmp1);
    907905        mr_free(tmp1);
     
    11841182
    11851183    if (flag_set['b']) {
    1186         mr_asprintf(&psz, flag_val['b']);
     1184        mr_asprintf(&psz, "%s", flag_val['b']);
    11871185        log_msg(1, "psz = '%s'", psz);
    11881186        if (psz[strlen(psz) - 1] == 'k') {
     
    12301228            && !does_file_exist(bkpinfo->kernel_path)) {
    12311229            retval++;
    1232             mr_asprintf(&tmp1,
    1233                     "You specified kernel '%s', which does not exist\n",
    1234                     bkpinfo->kernel_path);
     1230            mr_asprintf(&tmp1, "You specified kernel '%s', which does not exist\n", bkpinfo->kernel_path);
    12351231            log_to_screen(tmp1);
    12361232            mr_free(tmp1);
     
    12721268        if (i) {
    12731269            retval++;
    1274             mr_asprintf(&tmp2,
    1275                     "Are you sure directory '%s' exists in remote dir '%s'?\nIf so, do you have rights to write to it?\n",
    1276                     bkpinfo->nfs_remote_dir, bkpinfo->nfs_mount);
     1270            mr_asprintf(&tmp2, "Are you sure directory '%s' exists in remote dir '%s'?\nIf so, do you have rights to write to it?\n", bkpinfo->nfs_remote_dir, bkpinfo->nfs_mount);
    12771271            log_to_screen(tmp2);
    12781272            mr_free(tmp2);
     
    15931587    case SIGKILL:
    15941588        mr_asprintf(&tmp, "SIGKILL");
    1595         mr_asprintf(&tmp2,
    1596                "I seriously have no clue how this signal even got to me. Something's wrong with your system.");
     1589        mr_asprintf(&tmp2, "I seriously have no clue how this signal even got to me. Something's wrong with your system.");
    15971590        break;
    15981591    case SIGTERM:
     
    16061599    case SIGSEGV:
    16071600        mr_asprintf(&tmp, "SIGSEGV");
    1608         mr_asprintf(&tmp2,
    1609                "Internal programming error. Please send a backtrace as well as your log.");
     1601        mr_asprintf(&tmp2, "Internal programming error. Please send a backtrace as well as your log.");
    16101602        break;
    16111603    case SIGPIPE:
  • branches/2.2.10/mondo/src/common/libmondo-devices.c

    r2291 r2296  
    257257        mr_asprintf(&command, "cdcontrol -f %s close", dev);
    258258    } else {
    259         mr_asprintf(&command, "camcontrol load `echo %s | sed 's|/dev/||'`",
    260                 dev);
     259        mr_asprintf(&command, "camcontrol load `echo %s | sed 's|/dev/||'`", dev);
    261260    }
    262261#else
     
    343342#ifdef __FreeBSD__
    344343    // We assume here that this is running from mondorestore. (It is.)
    345     mr_asprintf(&program, "ls %s %s >/dev/null 2>&1", drive,
    346             build_partition_name(tmp, drive, partno));
     344    mr_asprintf(&program, "ls %s %s >/dev/null 2>&1", drive, build_partition_name(tmp, drive, partno));
    347345    res = system(program);
    348346    mr_free(program);
     
    399397    assert_string_is_neither_NULL_nor_zerolength(str);
    400398
    401     mr_asprintf(&command,
    402             "dd if=%s bs=446 count=1 2> /dev/null | strings | grep \"%s\" > /dev/null 2> /dev/null",
    403             dev, str);
     399    mr_asprintf(&command, "dd if=%s bs=446 count=1 2> /dev/null | strings | grep \"%s\" > /dev/null 2> /dev/null", dev, str);
    404400    i = system(command);
    405401    mr_free(command);
     
    425421    int i;
    426422
    427     mr_asprintf(&command,
    428             "dd if=%s bs=512 count=%i 2> /dev/null | strings | grep \"%s\" > /dev/null 2> /dev/null",
    429             dev, n, str);
     423    mr_asprintf(&command, "dd if=%s bs=512 count=%i 2> /dev/null | strings | grep \"%s\" > /dev/null 2> /dev/null", dev, n, str);
    430424    i = system(command);
    431425    mr_free(command);
     
    530524    }
    531525    if (find_home_of_exe(cdr_exe)) {
    532         mr_asprintf(&command,
    533                 "%s -scanbus 2> /dev/null | tr -s '\t' ' ' | grep \"[0-9]*,[0-9]*,[0-9]*\" | grep -v \"[0-9]*) \\*\" | grep CD | cut -d' ' -f2 | head -n1",
    534                 cdr_exe);
     526        mr_asprintf(&command, "%s -scanbus 2> /dev/null | tr -s '\t' ' ' | grep \"[0-9]*,[0-9]*,[0-9]*\" | grep -v \"[0-9]*) \\*\" | grep CD | cut -d' ' -f2 | head -n1", cdr_exe);
    535527        mr_asprintf(&tmp, "%s", call_program_and_get_last_line_of_output(command));
    536528        mr_free(command);
     
    848840    }
    849841
    850     mr_asprintf(&command,
    851             "%s -scanbus | grep \"[0-9],[0-9],[0-9]\" | grep \"[D|C][V|D]\" | grep -n \"\" | grep \"%s\" | cut -d':' -f2",
    852             cdr_exe, g_cdrw_drive_is_here);
     842    mr_asprintf(&command, "%s -scanbus | grep \"[0-9],[0-9],[0-9]\" | grep \"[D|C][V|D]\" | grep -n \"\" | grep \"%s\" | cut -d':' -f2", cdr_exe, g_cdrw_drive_is_here);
    853843    log_msg(1, "command=%s", command);
    854844    mr_asprintf(&tmp1, "%s", call_program_and_get_last_line_of_output(command));
     
    10421032
    10431033#ifdef __FreeBSD__
    1044     mr_asprintf(&command,
    1045             "lsvfs | tr -s '\t' ' ' | grep -v Filesys | grep -v -- -- | cut -d' ' -f1 | tr -s '\n' ' '");
     1034    mr_asprintf(&command, "lsvfs | tr -s '\t' ' ' | grep -v Filesys | grep -v -- -- | cut -d' ' -f1 | tr -s '\n' ' '");
    10461035#else
    1047     mr_asprintf(&command,
    1048             "grep -v nodev /proc/filesystems | tr -s '\t' ' ' | cut -d' ' -f2 | tr -s '\n' ' '");
     1036    mr_asprintf(&command, "grep -v nodev /proc/filesystems | tr -s '\t' ' ' | cut -d' ' -f2 | tr -s '\n' ' '");
    10491037#endif
    10501038
     
    12431231
    12441232#ifdef __FreeBSD__
    1245     mr_asprintf(&command, "mount_vfat %s %s 2>> %s",
    1246             device, mountpoint, MONDO_LOGFILE);
     1233    mr_asprintf(&command, "mount_vfat %s %s 2>> %s", device, mountpoint, MONDO_LOGFILE);
    12471234
    12481235#else
    1249     mr_asprintf(&command, "mount %s -t vfat %s 2>> %s",
    1250             device, mountpoint, MONDO_LOGFILE);
     1236    mr_asprintf(&command, "mount %s -t vfat %s 2>> %s", device, mountpoint, MONDO_LOGFILE);
    12511237#endif
    12521238
     
    13821368        mr_free(tmp);
    13831369
    1384         mr_asprintf(&tmp, "%s/%s/%s-%d.iso", bkpinfo->isodir,
    1385                 bkpinfo->nfs_remote_dir, bkpinfo->prefix,
    1386                 cd_number_i_want);
     1370        mr_asprintf(&tmp, "%s/%s/%s-%d.iso", bkpinfo->isodir, bkpinfo->nfs_remote_dir, bkpinfo->prefix, cd_number_i_want);
    13871371        if (!does_file_exist(tmp)) {
    13881372            mr_free(tmp);
    1389             mr_asprintf(&tmp, "%s/isodir/%s/%s-%d.iso", bkpinfo->tmpdir,
    1390                     bkpinfo->nfs_remote_dir, bkpinfo->prefix,
    1391                     cd_number_i_want);
     1373            mr_asprintf(&tmp, "%s/isodir/%s/%s-%d.iso", bkpinfo->tmpdir, bkpinfo->nfs_remote_dir, bkpinfo->prefix, cd_number_i_want);
    13921374            if (does_file_exist(tmp)) {
    13931375                log_msg(1,
     
    15501532            mr_free(tmp);
    15511533
    1552             mr_asprintf(&comment,
    1553                     "How much data (in Megabytes) will each %s store?", mds);
     1534            mr_asprintf(&comment, "How much data (in Megabytes) will each %s store?", mds);
    15541535            mr_free(mds);
    15551536            if (!popup_and_get_string("Size", comment, sz_size, 5)) {
     
    15881569                log_msg(1, "bkpinfo->media_device = %s",
    15891570                        bkpinfo->media_device);
    1590                 mr_asprintf(&comment,
    1591                         "Please specify your %s drive's /dev entry", mds);
     1571                mr_asprintf(&comment, "Please specify your %s drive's /dev entry", mds);
    15921572                if (!popup_and_get_string
    15931573                    ("Device?", comment, bkpinfo->media_device,
     
    17611741
    17621742            if (!bkpinfo->restore_data) {
    1763                 mr_asprintf(&comment,
    1764                     "How much data (in Megabytes) will each media store?");
     1743                mr_asprintf(&comment, "How much data (in Megabytes) will each media store?");
    17651744                if (!popup_and_get_string("Size", comment, sz_size, 5)) {
    17661745                    mr_free(comment);
  • branches/2.2.10/mondo/src/common/libmondo-fifo.c

    r2291 r2296  
    8888    for (bufsize = wise_upper_limit, res = -1;
    8989         res != 0 && bufsize >= wise_lower_limit; bufsize--) {
    90         mr_asprintf(&tmp,
    91                 "dd if=/dev/zero bs=1024 count=16k 2> /dev/null | buffer -o /dev/null -s %ld -m %d%c",
    92                 internal_tape_block_size, bufsize, 'm');
     90        mr_asprintf(&tmp, "dd if=/dev/zero bs=1024 count=16k 2> /dev/null | buffer -o /dev/null -s %ld -m %d%c", internal_tape_block_size, bufsize, 'm');
    9391        res = run_program_and_log_output(tmp, 2);
    9492        mr_free(tmp);
  • branches/2.2.10/mondo/src/common/libmondo-filelist.c

    r2291 r2296  
    500500        mr_free(command);
    501501
    502         mr_asprintf(&command,
    503                 "getfacl --all-effective -P %s 2>> %s | gzip -c1 > %s 2>> %s",
    504                 filelist, MONDO_LOGFILE, facl_fname, MONDO_LOGFILE);
     502        mr_asprintf(&command, "getfacl --all-effective -P %s 2>> %s | gzip -c1 > %s 2>> %s", filelist, MONDO_LOGFILE, facl_fname, MONDO_LOGFILE);
    505503        log_it("%s",command);
    506504        retval = system(command);
  • branches/2.2.10/mondo/src/common/libmondo-files.c

    r2289 r2296  
    7171        mr_free(command);
    7272    } else {
    73         mr_asprintf(&tmp, "File '%s' not found; cannot calc checksum",
    74                 filename);
     73        mr_asprintf(&tmp, "File '%s' not found; cannot calc checksum", filename);
    7574        log_it(tmp);
    7675        mr_free(tmp);
     
    143142    assert_string_is_neither_NULL_nor_zerolength(filename);
    144143    if (!does_file_exist(filename)) {
    145         mr_asprintf(&tmp,
    146                 "%s does not exist, so I cannot found the number of lines in it",
    147                 filename);
     144        mr_asprintf(&tmp, "%s does not exist, so I cannot found the number of lines in it", filename);
    148145        log_it(tmp);
    149146        mr_free(tmp);
     
    358355            return (NULL);      // forget it :)
    359356        }
    360         mr_asprintf(&command,
    361                 "file %s 2> /dev/null | cut -d':' -f1 2> /dev/null",
    362                 incoming);
     357        mr_asprintf(&command, "file %s 2> /dev/null | cut -d':' -f1 2> /dev/null", incoming);
    363358        strcpy(incoming,
    364359               call_program_and_get_last_line_of_output(command));
     
    459454         && !strstr(err_log_lines[i], "% done"); i--);
    460455    if (i < 0) {
    461         mr_asprintf(&command,
    462                 "tail -n3 %s | grep -Fi \"%c\" | tail -n1 | awk '{print $0;}'",
    463                 filename, '%');
     456        mr_asprintf(&command, "tail -n3 %s | grep -Fi \"%c\" | tail -n1 | awk '{print $0;}'", filename, '%');
    464457        strcpy(lastline,
    465458               call_program_and_get_last_line_of_output(command));
     
    512505
    513506    if (!does_file_exist(filename)) {
    514         mr_asprintf(&tmp, "Tring to get last line of nonexistent file (%s)",
    515                 filename);
     507        mr_asprintf(&tmp, "Tring to get last line of nonexistent file (%s)", filename);
    516508        log_it(tmp);
    517509        mr_free(tmp);
     
    630622                time_remaining =
    631623                    time_taken * 100 / (long) (percentage) - time_taken;
    632                 mr_asprintf(&tmp,
    633                         "%02d%% done   %02d:%02d taken   %02d:%02d remaining  %-37s\r",
    634                         percentage, (int) (time_taken / 60),
    635                         (int) (time_taken % 60),
    636                         (int) (time_remaining / 60),
    637                         (int) (time_remaining % 60), curr_fname);
     624                mr_asprintf(&tmp, "%02d%% done   %02d:%02d taken   %02d:%02d remaining  %-37s\r", percentage, (int) (time_taken / 60), (int) (time_taken % 60), (int) (time_remaining / 60), (int) (time_remaining % 60), curr_fname);
    638625                log_to_screen(tmp);
    639626                mr_free(tmp);
     
    758745
    759746    mr_asprintf(&mountlist, "%s/mountlist.txt", tmpdir);
    760     mr_asprintf(&command,
    761             "grep \"%s \" %s/mountlist.txt | head -n1 | awk '{print $4}'",
    762             dev, tmpdir);
     747    mr_asprintf(&command, "grep \"%s \" %s/mountlist.txt | head -n1 | awk '{print $4}'", dev, tmpdir);
    763748    mr_free(mountlist);
    764749
     
    837822                log_msg(4, "%s --> %ld K", fname, file_len_K);
    838823            }
    839             mr_asprintf(&comment,
    840                     "After adding %s, scratchL+%ld now equals %ld", fname,
    841                     file_len_K, scratchL);
     824            mr_asprintf(&comment, "After adding %s, scratchL+%ld now equals %ld", fname, file_len_K, scratchL);
    842825            log_msg(4, comment);
    843826            mr_free(comment);
     
    10601043        find_and_store_mondoarchives_home(g_mondo_home);
    10611044    }
    1062     mr_asprintf(&command, CP_BIN " --parents -pRdf %s %s", g_mondo_home,
    1063             bkpinfo->scratchdir);
     1045    mr_asprintf(&command, CP_BIN " --parents -pRdf %s %s", g_mondo_home, bkpinfo->scratchdir);
    10641046
    10651047    log_msg(4, "command = %s", command);
     
    10711053    }
    10721054
    1073     mr_asprintf(&command, "cp -f %s/LAST-FILELIST-NUMBER %s", bkpinfo->tmpdir,
    1074             bkpinfo->scratchdir);
     1055    mr_asprintf(&command, "cp -f %s/LAST-FILELIST-NUMBER %s", bkpinfo->tmpdir, bkpinfo->scratchdir);
    10751056    res = run_program_and_log_output(command, FALSE);
    10761057    mr_free(command);
     
    10991080
    11001081    if (bkpinfo->postnuke_tarball[0]) {
    1101         mr_asprintf(&command, "cp -f %s %s/post-nuke.tgz",
    1102                 bkpinfo->postnuke_tarball, bkpinfo->tmpdir);
     1082        mr_asprintf(&command, "cp -f %s %s/post-nuke.tgz", bkpinfo->postnuke_tarball, bkpinfo->tmpdir);
    11031083        res = run_program_and_log_output(command, FALSE);
    11041084        mr_free(command);
     
    11501130    }
    11511131    *(p++) = '\0';
    1152     mr_asprintf(&nfs_server_ipaddr, tmp);
    1153     mr_asprintf(&nfs_mount, p);
     1132    mr_asprintf(&nfs_server_ipaddr, "%s", tmp);
     1133    mr_asprintf(&nfs_mount, "%s", p);
    11541134    mr_free(tmp);
    11551135
    11561136    /* BERLIOS : there is a bug #67 here as it only considers the first NIC */
    1157     mr_asprintf(&command,
    1158             "ifconfig | tr '\n' '#' | sed s/##// | tr '#' ' ' | tr '' '\n' | head -n1 | cut -d' ' -f1");
     1137    mr_asprintf(&command, "ifconfig | tr '\n' '#' | sed s/##// | tr '#' ' ' | tr '' '\n' | head -n1 | cut -d' ' -f1");
    11591138    mr_asprintf(&nfs_dev, "%s", call_program_and_get_last_line_of_output(command));
    11601139    mr_free(command);
    11611140
    1162     mr_asprintf(&command,
    1163             "%s", "ifconfig | tr '\n' '#' | sed s/##// | tr '#' ' ' | tr '' '\\n' | head -n1 | tr -s '\t' ' ' | cut -d' ' -f7 | cut -d':' -f2");
     1141    mr_asprintf(&command, "%s", "ifconfig | tr '\n' '#' | sed s/##// | tr '#' ' ' | tr '' '\\n' | head -n1 | tr -s '\t' ' ' | cut -d' ' -f7 | cut -d':' -f2");
    11641142    mr_asprintf(&nfs_client_ipaddr, "%s", call_program_and_get_last_line_of_output(command));
    11651143    mr_free(command);
    11661144
    1167     mr_asprintf(&command,
    1168             "%s", "ifconfig | tr '\n' '#' | sed s/##// | tr '#' ' ' | tr '' '\\n' | head -n1 | tr -s '\t' ' ' | cut -d' ' -f9 | cut -d':' -f2");
     1145    mr_asprintf(&command, "%s", "ifconfig | tr '\n' '#' | sed s/##// | tr '#' ' ' | tr '' '\\n' | head -n1 | tr -s '\t' ' ' | cut -d' ' -f9 | cut -d':' -f2");
    11691146    mr_asprintf(&nfs_client_netmask, "%s", call_program_and_get_last_line_of_output(command));
    11701147    mr_free(command);
    11711148
    1172     mr_asprintf(&command,
    1173             "%s", "ifconfig | tr '\n' '#' | sed s/##// | tr '#' ' ' | tr '' '\\n' | head -n1 | tr -s '\t' ' ' | cut -d' ' -f8 | cut -d':' -f2");
     1149    mr_asprintf(&command, "%s", "ifconfig | tr '\n' '#' | sed s/##// | tr '#' ' ' | tr '' '\\n' | head -n1 | tr -s '\t' ' ' | cut -d' ' -f8 | cut -d':' -f2");
    11741150    mr_asprintf(&nfs_client_broadcast, "%s", call_program_and_get_last_line_of_output(command));
    11751151    mr_free(command);
    11761152
    1177     mr_asprintf(&command,
    1178             "%s", "route -n | grep '^0.0.0.0' | awk '{print $2}'");
     1153    mr_asprintf(&command, "%s", "route -n | grep '^0.0.0.0' | awk '{print $2}'");
    11791154    mr_asprintf(&nfs_client_defgw, "%s", call_program_and_get_last_line_of_output(command));
    11801155    mr_free(command);
     
    11951170    if (!strncmp(nfs_dev, "bond", 4) || !strncmp(nfs_dev, "alb", 3) || !strncmp(nfs_dev, "aft", 3)) {
    11961171        log_to_screen("Found bonding device %s; looking for corresponding ethN slave device\n", nfs_dev);
    1197         mr_asprintf(&command,
    1198                 "%s", "ifconfig %s | awk '{print $5}' | head -n1", nfs_dev);
     1172        mr_asprintf(&command, "%s", "ifconfig %s | awk '{print $5}' | head -n1", nfs_dev);
    11991173        mr_asprintf(&mac_addr, "%s", call_program_and_get_last_line_of_output(command));
    12001174        mr_free(command);
     
    12041178        mr_free(nfs_dev);
    12051179
    1206         mr_asprintf(&nfs_dev, call_program_and_get_last_line_of_output(command));
     1180        mr_asprintf(&nfs_dev, "%s", call_program_and_get_last_line_of_output(command));
    12071181        mr_free(command);
    12081182
     
    13131287        mr_free(mds);
    13141288    } else if (scratchLL > 4) {
    1315         mr_asprintf(&tmp,
    1316                 "Your backup will occupy one meeeeellion media! (maybe %s)",
    1317                 number_to_text((int) (scratchLL + 1)));
     1289        mr_asprintf(&tmp, "Your backup will occupy one meeeeellion media! (maybe %s)", number_to_text((int) (scratchLL + 1)));
    13181290    } else {
    1319         mr_asprintf(&tmp, "Your backup will occupy approximately %s media.",
    1320                 number_to_text((int) (scratchLL + 1)));
     1291        mr_asprintf(&tmp, "Your backup will occupy approximately %s media.", number_to_text((int) (scratchLL + 1)));
    13211292    }
    13221293    if (!bkpinfo->image_devs[0] && (scratchLL < 50)) {
  • branches/2.2.10/mondo/src/common/libmondo-fork.c

    r2275 r2296  
    283283        log_if_failure = TRUE;
    284284    }
    285     mr_asprintf(&callstr, "%s > %s/mondo-run-prog-thing.tmp 2> %s/mondo-run-prog-thing.err",
    286              program, bkpinfo->tmpdir, bkpinfo->tmpdir);
     285    mr_asprintf(&callstr, "%s > %s/mondo-run-prog-thing.tmp 2> %s/mondo-run-prog-thing.err", program, bkpinfo->tmpdir, bkpinfo->tmpdir);
    287286    while ((p = strchr(callstr, '\r'))) {
    288287        *p = ' ';
     
    390389    mr_asprintf(&lockfile, "%s/mojo-jojo.bla.bla", bkpinfo->tmpdir);
    391390
    392     mr_asprintf(&command,
    393             "echo hi > %s ; %s >> %s 2>> %s; res=$?; sleep 1; rm -f %s; exit $res",
    394             lockfile, basic_call, MONDO_LOGFILE, MONDO_LOGFILE, lockfile);
     391    mr_asprintf(&command, "echo hi > %s ; %s >> %s 2>> %s; res=$?; sleep 1; rm -f %s; exit $res", lockfile, basic_call, MONDO_LOGFILE, MONDO_LOGFILE, lockfile);
    395392    open_evalcall_form(what_i_am_doing);
    396393    mr_asprintf(&tmp, "Executing %s", basic_call);
  • branches/2.2.10/mondo/src/common/libmondo-stream.c

    r2266 r2296  
    273273        strcpy(cdr_exe, "dvdrecord");
    274274    }
    275     mr_asprintf(&command, "%s -scanbus 2> /dev/null | grep -i tape | wc -l",
    276             cdr_exe);
     275    mr_asprintf(&command, "%s -scanbus 2> /dev/null | grep -i tape | wc -l", cdr_exe);
    277276    strcpy(tmp, call_program_and_get_last_line_of_output(command));
    278277    mr_free(command);
     
    284283        return 1;
    285284    }
    286     mr_asprintf(&command,
    287             "%s -scanbus 2> /dev/null | tr -s '\t' ' ' | grep \"[0-9]*,[0-9]*,[0-9]*\" | grep -v \"[0-9]*) \\*\" | grep -i TAPE | cut -d' ' -f2 | head -n1",
    288             cdr_exe);
     285    mr_asprintf(&command, "%s -scanbus 2> /dev/null | tr -s '\t' ' ' | grep \"[0-9]*,[0-9]*,[0-9]*\" | grep -v \"[0-9]*) \\*\" | grep -i TAPE | cut -d' ' -f2 | head -n1", cdr_exe);
    289286    strcpy(tmp, call_program_and_get_last_line_of_output(command));
    290287    mr_free(command);
     
    294291        return 1;
    295292    }
    296     mr_asprintf(&command,
    297             "%s -scanbus 2> /dev/null | tr -s '\t' ' ' | grep \"[0-9]*,[0-9]*,[0-9]*\" | grep -v \"[0-9]*) \\*\" | grep -i TAPE | cut -d' ' -f3 | cut -d')' -f1 | head -n1",
    298             cdr_exe);
     293    mr_asprintf(&command, "%s -scanbus 2> /dev/null | tr -s '\t' ' ' | grep \"[0-9]*,[0-9]*,[0-9]*\" | grep -v \"[0-9]*) \\*\" | grep -i TAPE | cut -d' ' -f3 | cut -d')' -f1 | head -n1", cdr_exe);
    299294    strcpy(tmp, call_program_and_get_last_line_of_output(command));
    300295    mr_free(command);
     
    475470    log_it("Insisting on tape #%d", tapeno);
    476471    if (g_current_media_number != tapeno) {
    477         mr_asprintf(&tmp,
    478                 "When the tape drive goes quiet, please insert volume %d in this series.",
    479                 tapeno);
     472        mr_asprintf(&tmp, "When the tape drive goes quiet, please insert volume %d in this series.", tapeno);
    480473        popup_and_OK(tmp);
    481474        mr_free(tmp);
     
    869862    (void) getcwd(old_cwd, MAX_STR_LEN);
    870863    chdir(bkpinfo->tmpdir);
    871     mr_asprintf(&tmp, "tar -zxf %s ./tmp/mondo-restore.cfg 2> /dev/null",
    872             outfname);
     864    mr_asprintf(&tmp, "tar -zxf %s ./tmp/mondo-restore.cfg 2> /dev/null", outfname);
    873865    paranoid_system(tmp);
    874866    mr_free(tmp);
     
    11431135    }
    11441136    if (strcmp(temp_cksum, actual_cksum)) {
    1145         mr_asprintf(&tmp, "actual cksum=%s; recorded cksum=%s", actual_cksum,
    1146                 temp_cksum);
     1137        mr_asprintf(&tmp, "actual cksum=%s; recorded cksum=%s", actual_cksum, temp_cksum);
    11471138        log_to_screen(tmp);
    11481139        mr_free(tmp);
    11491140
    1150         mr_asprintf(&tmp, "%s (%ld K) is corrupt on tape", temp_fname,
    1151                 (long) orig_size >> 10);
     1141        mr_asprintf(&tmp, "%s (%ld K) is corrupt on tape", temp_fname, (long) orig_size >> 10);
    11521142        log_to_screen(tmp);
    11531143        mr_free(tmp);
     
    15001490    }
    15011491    if (bkpinfo->backup_media_type == cdstream) {
    1502         mr_asprintf(&command,
    1503                 "cdrecord -eject dev=%s speed=%d fs=24m -waiti - >> %s 2>> %s",
    1504                 bkpinfo->media_device, bkpinfo->cdrw_speed, MONDO_LOGFILE,
    1505                 MONDO_LOGFILE);
     1492        mr_asprintf(&command, "cdrecord -eject dev=%s speed=%d fs=24m -waiti - >> %s 2>> %s", bkpinfo->media_device, bkpinfo->cdrw_speed, MONDO_LOGFILE, MONDO_LOGFILE);
    15061493        log_it("Opening OUT to next CD with the command");
    15071494        log_it(command);
     
    17061693        p++;
    17071694    }
    1708     mr_asprintf(&tmp, "Writing file '%s' to tape (%ld KB)", p,
    1709             (long) filesize >> 10);
     1695    mr_asprintf(&tmp, "Writing file '%s' to tape (%ld KB)", p, (long) filesize >> 10);
    17101696    log_it(tmp);
    17111697    mr_free(tmp);
     
    18121798        fwrite(tempblock, 1, (size_t) TAPE_BLOCK_SIZE,
    18131799               g_tape_stream) / 1024;
    1814     mr_asprintf(&tmp, "%s (fname=%s, size=%ld K)",
    1815             marker_to_string(control_char), p,
    1816             (long) length_of_incoming_file >> 10);
     1800    mr_asprintf(&tmp, "%s (fname=%s, size=%ld K)", marker_to_string(control_char), p, (long) length_of_incoming_file >> 10);
    18171801    log_msg(6, tmp);
    18181802    mr_free(tmp);
  • branches/2.2.10/mondo/src/common/libmondo-tools.c

    r2291 r2296  
    610610
    611611        log_it("isodir = %s", bkpinfo->isodir);
    612         mr_asprintf(&command, "df -P %s | tail -n1 | cut -d' ' -f1",
    613                 bkpinfo->isodir);
     612        mr_asprintf(&command, "df -P %s | tail -n1 | cut -d' ' -f1", bkpinfo->isodir);
    614613        log_it("command = %s", command);
    615614        log_it("res of it = %s", call_program_and_get_last_line_of_output(command));
     
    911910            ("ln -sf `which mkfs.msdos` /sbin/mkfs.vfat", FALSE);
    912911    }
    913     mr_asprintf(&tmp, "%s",
    914            call_program_and_get_last_line_of_output
    915            ("free | grep Mem | head -n1 | tr -s ' ' '\t' | cut -f2"));
     912    mr_asprintf(&tmp, "%s", call_program_and_get_last_line_of_output("free | grep Mem | head -n1 | tr -s ' ' '\t' | cut -f2"));
    916913    if (atol(tmp) < 35000) {
    917914        retval++;
     
    984981    run_program_and_log_output
    985982        ("umount `mount | grep cdr | cut -d' ' -f3 | tr '\n' ' '`", 5);
    986     mr_asprintf(&tmp, "%s",
    987            call_program_and_get_last_line_of_output
    988            ("mount | grep -E \"cdr(om|w)\""));
     983    mr_asprintf(&tmp, "%s", call_program_and_get_last_line_of_output("mount | grep -E \"cdr(om|w)\""));
    989984    if (strcmp("", tmp)) {
    990985        if (strstr(tmp, "autofs")) {
     
    10671062    assert_string_is_neither_NULL_nor_zerolength(label);
    10681063    if (!does_file_exist(config_file)) {
    1069         mr_asprintf(&tmp, "(read_cfg_var) Cannot find %s config file",
    1070                 config_file);
     1064        mr_asprintf(&tmp, "(read_cfg_var) Cannot find %s config file", config_file);
    10711065        log_to_screen(tmp);
    10721066        mr_free(tmp);
     
    10781072        return (0);
    10791073    } else {
    1080         mr_asprintf(&command, "grep '%s .*' %s| cut -d' ' -f2,3,4,5",
    1081                 label, config_file);
     1074        mr_asprintf(&command, "grep '%s .*' %s| cut -d' ' -f2,3,4,5", label, config_file);
    10821075        strcpy(value, call_program_and_get_last_line_of_output(command));
    10831076        mr_free(command);
     
    12071200    g_boot_mountpt[0] = '\0';
    12081201    log_msg(4, "Done. Great. Seeting command to something");
    1209     mr_asprintf(&command, "%s",
    1210            "grep -v \":\" /etc/fstab | grep -vE '^#.*$' | grep -E \"[   ]/boot[     ]\" | tr -s ' ' '\t' | cut -f1 | head -n1");
     1202    mr_asprintf(&command, "grep -v \":\" /etc/fstab | grep -vE '^#.*$' | grep -E \"[    ]/boot[     ]\" | tr -s ' ' '\t' | cut -f1 | head -n1");
    12111203    log_msg(4, "Cool. Command = '%s'", command);
    12121204    mr_asprintf(&tmp, "%s", call_program_and_get_last_line_of_output(command));
     
    12181210        mr_asprintf(&command, "mount | grep -Ew '/boot'");
    12191211        mr_free(tmp);
    1220         mr_asprintf(&tmp, call_program_and_get_last_line_of_output(command));
     1212        mr_asprintf(&tmp, "%s", call_program_and_get_last_line_of_output(command));
    12211213        mr_free(command);
    12221214
     
    12351227                    strcpy(g_boot_mountpt, tmp);
    12361228                    mr_free(tmp);
    1237                     mr_asprintf(&tmp,
    1238                             "%s (your /boot partition) is not mounted. I'll mount it before backing up",
    1239                             g_boot_mountpt);
     1229                    mr_asprintf(&tmp, "%s (your /boot partition) is not mounted. I'll mount it before backing up", g_boot_mountpt);
    12401230                    log_it(tmp);
    12411231                    mr_free(tmp);
     
    13041294    assert(value != NULL);
    13051295    if (!does_file_exist(config_file)) {
    1306         mr_asprintf(&tmp, "(write_cfg_file) Cannot find %s config file",
    1307                 config_file);
     1296        mr_asprintf(&tmp, "(write_cfg_file) Cannot find %s config file", config_file);
    13081297        log_to_screen(tmp);
    13091298        mr_free(tmp);
     
    13121301    mr_asprintf(&tempfile, "%s/mojo-jojo.blah", bkpinfo->tmpdir);
    13131302    if (does_file_exist(config_file)) {
    1314         mr_asprintf(&command, "grep -vE '^%s .*$' %s > %s",
    1315                 label, config_file, tempfile);
     1303        mr_asprintf(&command, "grep -vE '^%s .*$' %s > %s", label, config_file, tempfile);
    13161304        paranoid_system(command);
    13171305        mr_free(command);
  • branches/2.2.10/mondo/src/common/libmondo-verify.c

    r2276 r2296  
    107107
    108108    log_msg(1, "Now scanning log file for 'star: ' stuff");
    109     mr_asprintf(&command,
    110             "grep \"star: \" %s | sed 's/star: //' | grep -vE '^/dev/.*$' >> %s",
    111             stderr_fname, afio_found_changes);
     109    mr_asprintf(&command, "grep \"star: \" %s | sed 's/star: //' | grep -vE '^/dev/.*$' >> %s", stderr_fname, afio_found_changes);
    112110    log_msg(2, command);
    113111    res = system(command);
     
    118116    }
    119117    afio_diffs = count_lines_in_file(afio_found_changes);
    120     mr_asprintf(&command,
    121             "sort %s %s %s | uniq -c | awk '{ if ($1==\"2\") {print $2;};}' | grep -v \"incheckentry xwait()\" > %s",
    122             ignorefiles_fname, afio_found_changes, afio_found_changes,
    123             changedfiles_fname);
     118    mr_asprintf(&command, "sort %s %s %s | uniq -c | awk '{ if ($1==\"2\") {print $2;};}' | grep -v \"incheckentry xwait()\" > %s", ignorefiles_fname, afio_found_changes, afio_found_changes, changedfiles_fname);
    124119    mr_free(afio_found_changes);
    125120    log_msg(2, command);
     
    172167        } else {
    173168            retval++;
    174             mr_asprintf(&tmp, "Warning - missing set(s) between %d and %d\n",
    175                     g_last_afioball_number, set_number - 1);
     169            mr_asprintf(&tmp, "Warning - missing set(s) between %d and %d\n", g_last_afioball_number, set_number - 1);
    176170            log_to_screen(tmp);
    177171            mr_free(tmp);
     
    342336                    g_current_media_number, bigfile_num, slice_num);
    343337            if (!does_file_exist(slice_fname(bigfile_num, slice_num, mountpoint, ""))) {
    344                 mr_asprintf(&command, "%s -dc %s 2>> %s",
    345                         sz_exe,
    346                         slice_fname(bigfile_num, slice_num, mountpoint, bkpinfo->zip_suffix),
    347                         MONDO_LOGFILE);
     338                mr_asprintf(&command, "%s -dc %s 2>> %s", sz_exe, slice_fname(bigfile_num, slice_num, mountpoint, bkpinfo->zip_suffix), MONDO_LOGFILE);
    348339            } else {
    349340                mr_asprintf(&command, "cat %s 2>> %s", slice_fname(bigfile_num, slice_num, mountpoint, ""), MONDO_LOGFILE);
     
    474465        bkpinfo->use_star = TRUE;
    475466        if (strstr(tarball_fname, ".bz2"))
    476             mr_asprintf(&command,
    477                     "star -diff diffopts=mode,size,data file=%s %s >> %s 2>> %s",
    478                     tarball_fname,
    479                     (strstr(tarball_fname, ".bz2")) ? "-bz" : " ", outlog,
    480                     outlog);
     467            mr_asprintf(&command, "star -diff diffopts=mode,size,data file=%s -bz >> %s 2>> %s", tarball_fname, outlog, outlog);
    481468    } else {
    482469        bkpinfo->use_star = FALSE;
    483         mr_asprintf(&command, "afio -r -P %s -Z %s >> %s 2>> %s",
    484                 bkpinfo->zip_exe, tarball_fname, outlog, outlog);
     470        mr_asprintf(&command, "afio -r -P %s -Z %s >> %s 2>> %s", bkpinfo->zip_exe, tarball_fname, outlog, outlog);
    485471    }
    486472    log_msg(6, "command=%s", command);
     
    491477        mr_asprintf(&command, "cat %s >> %s", outlog, MONDO_LOGFILE);
    492478    } else {
    493         mr_asprintf(&command, "cut -d: -f%d %s | sort -u",
    494                 (bkpinfo->use_star) ? 1 : 2, outlog);
     479        mr_asprintf(&command, "cut -d: -f%d %s | sort -u", (bkpinfo->use_star) ? 1 : 2, outlog);
    495480        pin = popen(command, "r");
    496481        if (pin) {
     
    794779        res = verify_an_afioball_from_stream(fname, size);
    795780        if (res) {
    796             mr_asprintf(&tmp, "Afioball %ld differs from live filesystem",
    797                     current_afioball_number);
     781            mr_asprintf(&tmp, "Afioball %ld differs from live filesystem", current_afioball_number);
    798782            log_to_screen(tmp);
    799783            mr_free(tmp);
     
    897881            p++;
    898882        }
    899         mr_asprintf(&comment, "Verifying bigfile #%ld (%ld K)",
    900                 current_biggiefile_number, (long) size >> 10);
     883        mr_asprintf(&comment, "Verifying bigfile #%ld (%ld K)", current_biggiefile_number, (long) size >> 10);
    901884        update_progress_form(comment);
    902885        mr_free(comment);
     
    12081191    diffs = count_lines_in_file(changed_files_fname);
    12091192    if (diffs > 0) {
    1210         mr_asprintf(&tmp, "cp -f %s %s/changed.files", changed_files_fname,
    1211                 MONDO_CACHE);
     1193        mr_asprintf(&tmp, "cp -f %s %s/changed.files", changed_files_fname, MONDO_CACHE);
    12121194        run_program_and_log_output(tmp, FALSE);
    12131195        mr_free(tmp);
  • branches/2.2.10/mondo/src/common/newt-specific.c

    r2291 r2296  
    10261026            || percentage > g_isoform_old_progress) {
    10271027            g_isoform_old_progress = percentage;
    1028             mr_asprintf(&timeline_str, "%2ld:%02ld taken            %2ld:%02ld remaining", (long) time_taken / 60, (long) time_taken % 60,
    1029                             (long) time_remaining / 60, (long) time_remaining % 60);
     1028            mr_asprintf(&timeline_str, "%2ld:%02ld taken            %2ld:%02ld remaining", (long) time_taken / 60, (long) time_taken % 60, (long) time_remaining / 60, (long) time_remaining % 60);
    10301029            if (percentage < 3) {
    10311030                mr_asprintf(&pcline_str, " Working");
     
    10381037                mr_strcat(pcline_str, " %c", special_dot_char(g_mysterious_dot_counter));
    10391038            } else {
    1040                 mr_asprintf(&pcline_str, " %3d%% done              %3d%% to go",
    1041                         percentage, 100 - percentage);
     1039                mr_asprintf(&pcline_str, " %3d%% done              %3d%% to go", percentage, 100 - percentage);
    10421040            }
    10431041            if (g_text_mode) {
     
    11431141        } else {
    11441142            if (g_current_progress > g_maximum_progress) {
    1145                 mr_asprintf(&tmp,
    1146                         "update_progress_form_full(%s,%s,%s) --- g_current_progress=%ld; g_maximum_progress=%ld",
    1147                         blurb1, blurb2, blurb3, g_current_progress,
    1148                         g_maximum_progress);
    1149                 log_msg(0, tmp);
    1150                 mr_free(tmp);
     1143                log_msg(0, "update_progress_form_full(%s,%s,%s) --- g_current_progress=%ld; g_maximum_progress=%ld", blurb1, blurb2, blurb3, g_current_progress, g_maximum_progress);
    11511144                g_current_progress = g_maximum_progress;
    11521145            }
     
    11851178            paranoid_free(taskprogress);
    11861179        } else {
    1187             mr_asprintf(&timeline_str, "%2ld:%02ld taken               %2ld:%02ld remaining  ",
    1188                 (long) time_taken / 60, (long) time_taken % 60, (long) time_remaining / 60, (long) time_remaining % 60);
     1180            mr_asprintf(&timeline_str, "%2ld:%02ld taken               %2ld:%02ld remaining  ", (long) time_taken / 60, (long) time_taken % 60, (long) time_remaining / 60, (long) time_remaining % 60);
    11891181            mr_asprintf(percentline_str, " %3d%% done                 %3d%% to go", percentage, 100 - percentage);
    11901182
     
    16081600                                   keylist[i]);
    16091601        }
    1610         mr_asprintf(&differ_sz,
    1611                 "  %ld files differ. Hit 'Select' to pick a file. Hit 'Close' to quit the list.",
    1612                 i);
     1602        mr_asprintf(&differ_sz, "  %ld files differ. Hit 'Select' to pick a file. Hit 'Close' to quit the list.", i);
    16131603        newtPushHelpLine(differ_sz);
    16141604        mr_free(differ_sz);
Note: See TracChangeset for help on using the changeset viewer.