Ignore:
Timestamp:
Jun 3, 2009, 7:10:19 PM (15 years ago)
Author:
Bruno Cornec
Message:

r3089@localhost: bruno | 2009-05-18 06:41:05 +0200

  • move call to asprintf to call to mr_asprintf (suppress a compiler warning)
  • remove all the most obvious bad call to strcat and replace by mr_strcat as appropriate
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.9/mondo/src/common/libmondo-stream.c

    r2176 r2211  
    1313
    1414#include "my-stuff.h"
     15#include "mr_mem.h"
    1516#include "mondostructures.h"
    1617#include "libmondo-devices.h"
     
    369370        }
    370371        if (strstr(fname, "xattr") == NULL) {
    371             asprintf(&tmp,"Wrong order expected xattr, got %s, sunshine.", fname);
     372            mr_asprintf(&tmp,"Wrong order expected xattr, got %s, sunshine.", fname);
    372373            fatal_error(tmp);
    373374        }
     
    399400        }
    400401        if (strstr(fname, "acl") == NULL) {
    401             asprintf(&tmp,"Wrong order expected acl, got %s, sunshine.", fname);
     402            mr_asprintf(&tmp,"Wrong order expected acl, got %s, sunshine.", fname);
    402403            fatal_error(tmp);
    403404        }
     
    682683
    683684    log_it("Skipping OBDR headers");
    684     asprintf(&command, "mt -f %s rewind",bkpinfo->media_device);
     685    mr_asprintf(&command, "mt -f %s rewind",bkpinfo->media_device);
    685686    res = run_program_and_log_output(command, 1);
    686687    paranoid_free(command);
    687688
    688     asprintf(&command, "mt -f %s fsf 2",bkpinfo->media_device);
     689    mr_asprintf(&command, "mt -f %s fsf 2",bkpinfo->media_device);
    689690    res = run_program_and_log_output(command, 1);
    690691    paranoid_free(command);
     
    709710    log_it("Creating OBDR headers");
    710711    /* OBDR: First block 10 kB of zero bs = 512 */
    711     asprintf(&command, "mt -f %s compression off",bkpinfo->media_device);
     712    mr_asprintf(&command, "mt -f %s compression off",bkpinfo->media_device);
    712713    res = run_program_and_log_output(command, 1);
    713714    paranoid_free(command);
    714715
    715     asprintf(&command, "mt -f %s rewind",bkpinfo->media_device);
     716    mr_asprintf(&command, "mt -f %s rewind",bkpinfo->media_device);
    716717    res += run_program_and_log_output(command, 1);
    717718    paranoid_free(command);
     
    719720    set_tape_block_size_with_mt(512);
    720721
    721     asprintf(&command, "dd if=/dev/zero of=%s bs=512 count=20",bkpinfo->media_device);
     722    mr_asprintf(&command, "dd if=/dev/zero of=%s bs=512 count=20",bkpinfo->media_device);
    722723    res += run_program_and_log_output(command, 1);
    723724    paranoid_free(command);
     
    726727    set_tape_block_size_with_mt(2048);
    727728
    728     asprintf(&command, "dd if=%s of=%s bs=2048",MINDI_CACHE"/mondorescue.iso",bkpinfo->media_device);
     729    mr_asprintf(&command, "dd if=%s of=%s bs=2048",MINDI_CACHE"/mondorescue.iso",bkpinfo->media_device);
    729730    res += run_program_and_log_output(command, 1);
    730731    paranoid_free(command);
Note: See TracChangeset for help on using the changeset viewer.