Ignore:
Timestamp:
Jul 23, 2009, 7:52:12 PM (15 years ago)
Author:
Bruno Cornec
Message:
  • g_serial_string is managed dynamically
File:
1 edited

Legend:

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

    r2296 r2301  
    12131213    mr_asprintf(&data_disks_file, "%s/all.tar.gz", bkpinfo->tmpdir);
    12141214
    1215     snprintf(g_serial_string, MAX_STR_LEN - 8, "%s",
    1216              call_program_and_get_last_line_of_output("dd \
    1217 if=/dev/urandom bs=16 count=1 2> /dev/null | \
    1218 hexdump | tr -s ' ' '0' | head -n1"));
     1215    mr_sprintf(&g_serial_string, "%s", call_program_and_get_last_line_of_output("dd if=/dev/urandom bs=16 count=1 2> /dev/null | hexdump | tr -s ' ' '0' | head -n1"));
    12191216    strip_spaces(g_serial_string);
    1220     strcat(g_serial_string, "...word.");
     1217    mr_strcat(g_serial_string, "...word.");
    12211218    log_msg(2, "g_serial_string = '%s'", g_serial_string);
    1222     assert(strlen(g_serial_string) < MAX_STR_LEN);
    12231219
    12241220    mr_asprintf(&tmpfile, "%s/archives/SERIAL-STRING", bkpinfo->scratchdir);
     
    27642760        run_program_and_log_output(szunmount, 1);
    27652761        log_msg(2, "paafcd: cd_number = %d", cd_number);
    2766         log_msg(2, "our serial str = %s; g_serial_string = %s",
    2767                 our_serial_str, g_serial_string);
     2762        log_msg(2, "our serial str = %s; g_serial_string = %s", our_serial_str, g_serial_string);
    27682763        if (cd_number > 0 && !strcmp(our_serial_str, g_serial_string)) {
    27692764            mds = media_descriptor_string(g_backup_media_type);
Note: See TracChangeset for help on using the changeset viewer.