Changeset 2317


Ignore:
Timestamp:
Aug 18, 2009, 2:36:42 PM (10 years ago)
Author:
bruno
Message:

r3328@localhost: bruno | 2009-08-04 00:26:50 +0200
g_serial_string dynamically allocated

Location:
branches/2.2.10/mondo/src/common
Files:
2 edited

Legend:

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

    r2313 r2317  
    6363extern bool g_cd_recovery;
    6464extern char *g_mondo_home;
    65 /*
    66 extern char *g_tmpfs_mountpt;
    67 */
    68 extern char *g_serial_string;
     65
     66/**
     67 * The serial string (used to differentiate between backups) of the current backup.
     68 */
     69char *g_serial_string = NULL;
     70
    6971extern char *g_getfacl;
    7072extern char *g_getfattr;
     
    12131215    mr_asprintf(&data_disks_file, "%s/all.tar.gz", bkpinfo->tmpdir);
    12141216
    1215     mr_asprintf(&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"));
    1216     strip_spaces(g_serial_string);
     1217    mr_asprintf(&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"));
     1218    mr_strip_spaces(g_serial_string);
    12171219    mr_strcat(g_serial_string, "...word.");
    12181220    log_msg(2, "g_serial_string = '%s'", g_serial_string);
  • branches/2.2.10/mondo/src/common/libmondo-tools.c

    r2301 r2317  
    3434extern int g_current_media_number;
    3535extern char *MONDO_LOGFILE;
     36extern char *g_serial_string;
    3637
    3738/* Reference to global bkpinfo */
     
    5657 */
    5758char *g_mondo_home = NULL;
    58 
    59 /**
    60  * The serial string (used to differentiate between backups) of the current backup.
    61  */
    62 char *g_serial_string = NULL;
    6359
    6460/**
     
    13831379        malloc_string(g_boot_mountpt);
    13841380        malloc_string(g_mondo_home);
    1385         /*
    1386         malloc_string(g_tmpfs_mountpt);
    1387         */
    13881381        malloc_string(g_magicdev_command);
    13891382    } else {
    13901383        paranoid_free(g_boot_mountpt);
    13911384        paranoid_free(g_mondo_home);
    1392         /*
    1393         paranoid_free(g_tmpfs_mountpt);
    1394         */
     1385        paranoid_free(g_magicdev_command);
     1386
    13951387        mr_free(g_serial_string);
    1396         paranoid_free(g_magicdev_command);
    1397 
    13981388    }
    13991389}
Note: See TracChangeset for help on using the changeset viewer.