Ignore:
Timestamp:
Aug 18, 2009, 3:05:43 PM (15 years ago)
Author:
Bruno Cornec
Message:

r3334@localhost: bruno | 2009-08-08 12:17:37 +0200

  • Change mr_asprintf interface to pass only the char * (makes bkpinfo usage more easy)
File:
1 edited

Legend:

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

    r2322 r2323  
    111111    for (i = 0; i < 128; i++) {
    112112        if (flag_set[i]) {
    113             mr_asprintf(&tmp, "-%c %s", i, flag_val[i]);
     113            mr_asprintf(tmp, "-%c %s", i, flag_val[i]);
    114114            log_msg(3, tmp);
    115115            mr_free(tmp);
    116116        }
    117117    }
    118     mr_asprintf(&tmp, "rm -Rf %s/tmp.mondo.*", bkpinfo->tmpdir);
     118    mr_asprintf(tmp, "rm -Rf %s/tmp.mondo.*", bkpinfo->tmpdir);
    119119    paranoid_system(tmp);
    120120    mr_free(tmp);
    121121
    122     mr_asprintf(&tmp, "rm -Rf %s/mondo.scratch.*", bkpinfo->scratchdir);
     122    mr_asprintf(tmp, "rm -Rf %s/mondo.scratch.*", bkpinfo->scratchdir);
    123123    paranoid_system(tmp);
    124124    mr_free(tmp);
     
    126126    mr_strcat(bkpinfo->scratchdir, "/mondo.scratch.%ld", random() % 32767);
    127127
    128     mr_asprintf(&tmp, "mkdir -p %s/tmpfs", bkpinfo->tmpdir);
     128    mr_asprintf(tmp, "mkdir -p %s/tmpfs", bkpinfo->tmpdir);
    129129    paranoid_system(tmp);
    130130    mr_free(tmp);
    131131
    132     mr_asprintf(&tmp, "mkdir -p %s", bkpinfo->scratchdir);
     132    mr_asprintf(tmp, "mkdir -p %s", bkpinfo->scratchdir);
    133133    paranoid_system(tmp);
    134134    mr_free(tmp);
     
    161161        *(strchr(tmp, ',')) = '\0';
    162162        bkpinfo->media_size[j] = friendly_sizestr_to_sizelong(tmp);
    163         mr_asprintf(&comment, "media_size[%d] = %ld", j, bkpinfo->media_size[j]);
     163        mr_asprintf(comment, "media_size[%d] = %ld", j, bkpinfo->media_size[j]);
    164164        log_msg(3, comment);
    165165        mr_free(comment);
     
    279279    ********/
    280280    /* Get the number of mounted file systems ((those that start with "/dev/" */
    281     mr_asprintf(&command, "mount 2>/dev/null | awk '{if($1 ~ \"^/dev/\"){print $0}}'|wc -l");
     281    mr_asprintf(command, "mount 2>/dev/null | awk '{if($1 ~ \"^/dev/\"){print $0}}'|wc -l");
    282282    log_msg(5, "Running: %s", command);
    283     mr_asprintf(&mounted_file_system, "%s", call_program_and_get_last_line_of_output(command));
     283    mr_asprintf(mounted_file_system, "%s", call_program_and_get_last_line_of_output(command));
    284284    mr_free(command);
    285285
     
    289289
    290290    for (i=mount_cnt; i > 0; i--) {
    291         mr_asprintf(&command, "mount 2>/dev/null | awk '{if($1 ~ \"^/dev/\"){print $1,$3}}'|head -n %d", i);
     291        mr_asprintf(command, "mount 2>/dev/null | awk '{if($1 ~ \"^/dev/\"){print $1,$3}}'|head -n %d", i);
    292292        log_msg(5, "Running: %s", command);
    293         mr_asprintf(&mounted_file_system, "%s", call_program_and_get_last_line_of_output(command));
     293        mr_asprintf(mounted_file_system, "%s", call_program_and_get_last_line_of_output(command));
    294294        mr_free(command);
    295295
     
    373373    log_msg(5, "  %s looks like a device special file", dsf);
    374374    /* Verify that the dsf exists */
    375     mr_asprintf(&command, "ls -al %s 2>/dev/null | wc -l", dsf);
     375    mr_asprintf(command, "ls -al %s 2>/dev/null | wc -l", dsf);
    376376    log_msg(5, "  Executing: %s", command);
    377     mr_asprintf(&tmp, "%s", call_program_and_get_last_line_of_output(command));
     377    mr_asprintf(tmp, "%s", call_program_and_get_last_line_of_output(command));
    378378    mr_free(command);
    379379
     
    399399    * Either way, it's an error.
    400400    ********/
    401     mr_asprintf(&command, "parted2fdisk -l %s 2>/dev/null|grep -E \"^/dev/\"|awk '{printf(\"%%s \", $1)}END{print \"\"}'", dsf);
     401    mr_asprintf(command, "parted2fdisk -l %s 2>/dev/null|grep -E \"^/dev/\"|awk '{printf(\"%%s \", $1)}END{print \"\"}'", dsf);
    402402    log_msg(4, "Executing: %s", command);
    403     mr_asprintf(&partition_list, "%s", call_program_and_get_last_line_of_output(command));
     403    mr_asprintf(partition_list, "%s", call_program_and_get_last_line_of_output(command));
    404404    mr_free(command);
    405405    log_msg(4, "Partition list for %s: %s", dsf, partition_list);
     
    452452        log_msg(4, "Processing partition: %s", partitions[i]);
    453453        /* See if it's swap. If it is, ignore it. */
    454         mr_asprintf(&command, "parted2fdisk -l %s 2>/dev/null | awk '{if(($1==\"%s\")&&(toupper($0) ~ \"SWAP\")){print $1;exit}}'",
     454        mr_asprintf(command, "parted2fdisk -l %s 2>/dev/null | awk '{if(($1==\"%s\")&&(toupper($0) ~ \"SWAP\")){print $1;exit}}'",
    455455          dsf, partitions[i]);
    456456        log_msg(4, "  Running: %s", command);
    457         mr_asprintf(&tmp, "%s", call_program_and_get_last_line_of_output(command));
     457        mr_asprintf(tmp, "%s", call_program_and_get_last_line_of_output(command));
    458458        mr_free(command);
    459459
     
    467467        }
    468468        /* It's not swap. See if we can find the mount point from the mount command. */
    469         mr_asprintf(&command, "mount 2>/dev/null | awk '{if((NF>0)&&($1==\"%s\")){print $3}}'", partitions[i]);
    470         mr_asprintf(&tmp, "%s", call_program_and_get_last_line_of_output(command));
     469        mr_asprintf(command, "mount 2>/dev/null | awk '{if((NF>0)&&($1==\"%s\")){print $3}}'", partitions[i]);
     470        mr_asprintf(tmp, "%s", call_program_and_get_last_line_of_output(command));
    471471        mr_free(command);
    472472
     
    486486        log_msg(4, "  It's not mounted. Checking to see if it's LVM...");
    487487        /* Get the partition ID; 8e for LVM */
    488         mr_asprintf(&command, "parted2fdisk -l %s |awk '{if($1 ~ \"^%s\"){print $5}}'", dsf, partitions[i]);
     488        mr_asprintf(command, "parted2fdisk -l %s |awk '{if($1 ~ \"^%s\"){print $5}}'", dsf, partitions[i]);
    489489        log_msg(4, "  Running: %s", command);
    490         mr_asprintf(&tmp, "%s", call_program_and_get_last_line_of_output(command));
     490        mr_asprintf(tmp, "%s", call_program_and_get_last_line_of_output(command));
    491491        mr_free(command);
    492492        if (strlen(tmp)) {
     
    495495                /* It's LVM: Find the VG it's in */
    496496                log_msg(4, "  It's LVM: Find the VG it's in...");
    497                 mr_asprintf(&command, "pvdisplay -v %s 2>/dev/null|grep \"VG Name\"|awk '{print $NF}'", partitions[i]);
     497                mr_asprintf(command, "pvdisplay -v %s 2>/dev/null|grep \"VG Name\"|awk '{print $NF}'", partitions[i]);
    498498                log_msg(4, "  Running: %s", command);
    499499                strcpy(VG, call_program_and_get_last_line_of_output(command));
     
    503503                    /* Found the Volume Group. Now find all of the VG's mount points */
    504504                    log_msg(4, "  Found the Volume Group. Now find all of the VG's mount points");
    505                     mr_asprintf(&command, "mount 2>/dev/null|grep -E \"/dev/mapper/%s-|/dev/%s/\"|awk '{printf(\"%%s \",$3)}END{print \"\"}'", VG, VG);
     505                    mr_asprintf(command, "mount 2>/dev/null|grep -E \"/dev/mapper/%s-|/dev/%s/\"|awk '{printf(\"%%s \",$3)}END{print \"\"}'", VG, VG);
    506506                    log_msg(4, "  Running: %s", command);
    507                     mr_asprintf(&mount_list, "%s", call_program_and_get_last_line_of_output(command));
     507                    mr_asprintf(mount_list, "%s", call_program_and_get_last_line_of_output(command));
    508508                    mr_free(command);
    509509                    log_msg(4, "  VG %s mount_list: %s", VG, mount_list);
     
    525525                     *******/
    526526                    mr_free(mount_list);
    527                     mr_asprintf(&command, "%s", "cat /proc/mdstat|grep -iv Personal|awk '{if($0~\"^.*[ ]+:\"){printf(\"/dev/%s \", $1)}}END{print \"\"}'");
     527                    mr_asprintf(command, "%s", "cat /proc/mdstat|grep -iv Personal|awk '{if($0~\"^.*[ ]+:\"){printf(\"/dev/%s \", $1)}}END{print \"\"}'");
    528528                    log_msg (5, "Running: %s", command);
    529                     mr_asprintf(&mount_list, "%s", call_program_and_get_last_line_of_output(command));
     529                    mr_asprintf(mount_list, "%s", call_program_and_get_last_line_of_output(command));
    530530                    mr_free(command);
    531531                    log_msg(4, "  Software raid device list: %s", mount_list);
    532532                    lastpos = 0;
    533533                    while ((token = mr_strtok(mount_list, token_chars, &lastpos)) != NULL) {
    534                         mr_asprintf(&command, "mdadm --detail %s 2>/dev/null | grep -c %s", token, VG);
     534                        mr_asprintf(command, "mdadm --detail %s 2>/dev/null | grep -c %s", token, VG);
    535535                        log_msg (5, "Running: %s", command);
    536536                        mr_free(tmp);
    537                         mr_asprintf(&tmp, "%s", call_program_and_get_last_line_of_output(command));
     537                        mr_asprintf(tmp, "%s", call_program_and_get_last_line_of_output(command));
    538538                        mr_free(command);
    539539                        log_msg(4, "Number of Software raid device: %s", tmp);
     
    567567         ********/
    568568        log_msg (5, "It's not swap, mounted, or LVM. See if it's used in a software raid device.");
    569         mr_asprintf(&command, "mdadm --examine %s 2>/dev/null | awk '{if($1 == \"UUID\"){print $3}}'", partitions[i]);
     569        mr_asprintf(command, "mdadm --examine %s 2>/dev/null | awk '{if($1 == \"UUID\"){print $3}}'", partitions[i]);
    570570        log_msg(4, "  Running: %s", command);
    571         mr_asprintf(&tmp, "%s", call_program_and_get_last_line_of_output(command));
     571        mr_asprintf(tmp, "%s", call_program_and_get_last_line_of_output(command));
    572572        mr_free(command);
    573573        if (!strlen(tmp)) {
     
    578578        log_msg (5, "  UUID: %s", tmp);
    579579        /* Get the Software raid device list */
    580         mr_asprintf(&command, "%s", "cat /proc/mdstat|grep -iv Personal|awk '{if($0~\"^.*[ ]+:\"){printf(\"/dev/%s \", $1)}}END{print \"\"}'");
     580        mr_asprintf(command, "%s", "cat /proc/mdstat|grep -iv Personal|awk '{if($0~\"^.*[ ]+:\"){printf(\"/dev/%s \", $1)}}END{print \"\"}'");
    581581        log_msg (5, "  Running: %s", command);
    582         mr_asprintf(&mount_list, "%s", call_program_and_get_last_line_of_output(command));
     582        mr_asprintf(mount_list, "%s", call_program_and_get_last_line_of_output(command));
    583583        mr_free(command);
    584584        log_msg(4, "  Software raid device list: %s", mount_list);
     
    586586        lastpos = 0;
    587587        while ((token = mr_strtok(mount_list, token_chars, &lastpos)) != NULL) {
    588             mr_asprintf(&command, "mdadm --detail %s 2>/dev/null | grep -c %s", token, tmp);
     588            mr_asprintf(command, "mdadm --detail %s 2>/dev/null | grep -c %s", token, tmp);
    589589            log_msg(4, "  Running: %s", command);
    590590            mr_free(tmp);
    591             mr_asprintf(&tmp, "%s", call_program_and_get_last_line_of_output(command));
     591            mr_asprintf(tmp, "%s", call_program_and_get_last_line_of_output(command));
    592592            mr_free(command);
    593593            if (!atoi(tmp)) {
     
    760760        }
    761761
    762         mr_asprintf(&tmp1, "%s", flag_val['I']);
     762        mr_asprintf(tmp1, "%s", flag_val['I']);
    763763        p = tmp1;
    764764        q = tmp1;
     
    797797                log_to_screen("Archiving only the following file systems on %s:\n", token);
    798798                log_to_screen("  %s\n", mounted_on_dsf);
    799                 mr_asprintf(&p, "/");
     799                mr_asprintf(p, "/");
    800800                mr_free(bkpinfo->include_paths);
    801801                bkpinfo->include_paths = p;
     
    837837        }
    838838        bkpinfo->make_filelist = FALSE;
    839         mr_asprintf(&p, "%s", flag_val['J']);
     839        mr_asprintf(p, "%s", flag_val['J']);
    840840        mr_free(bkpinfo->include_paths);
    841841        bkpinfo->include_paths = p;
     
    903903        strcpy(flag_val['d'], p);
    904904        mr_free(p);
    905         mr_asprintf(&tmp1, "You didn't specify a tape streamer device. I'm assuming %s", flag_val['d']);
     905        mr_asprintf(tmp1, "You didn't specify a tape streamer device. I'm assuming %s", flag_val['d']);
    906906        log_to_screen(tmp1);
    907907        mr_free(tmp1);
     
    954954            }
    955955        }
    956 /*
    957       if (flag_set['Z']) {
    958       bkpinfo->blank_dvd_first = TRUE;
    959       }
    960 */
    961956    }
    962957
     
    10091004            p--;
    10101005            *p = '\0';
    1011             mr_asprintf(&q,"%s",bkpinfo->nfs_mount);
     1006            mr_asprintf(q,"%s",bkpinfo->nfs_mount);
    10121007            bkpinfo->nfs_user = q;
    10131008            strcpy(bkpinfo->nfs_mount,tmp);
    10141009        }
    1015         mr_asprintf(&tmp1, "mount | grep -E \"^%s[/]* .*\" | cut -d' ' -f3",
    1016                 bkpinfo->nfs_mount);
    1017         strncpy(bkpinfo->isodir,
    1018                 call_program_and_get_last_line_of_output(tmp1),
    1019                 MAX_STR_LEN / 4);
     1010        mr_asprintf(tmp1, "mount | grep -E \"^%s[/]* .*\" | cut -d' ' -f3", bkpinfo->nfs_mount);
     1011        mr_free(bkpinfo->isodir);
     1012        mr_asprintf(tmp2, "%s", call_program_and_get_last_line_of_output(tmp1));
     1013        bkpinfo->isodir = tmp2;
    10201014        mr_free(tmp1);
    10211015
    10221016        if (strlen(bkpinfo->isodir) < 3) {
    10231017            log_to_screen("NFS share is not mounted. Trying to mount it for you.\n");
    1024             mr_asprintf(&tmp1, "mount %s", bkpinfo->nfs_mount);
     1018            mr_asprintf(tmp1, "mount %s", bkpinfo->nfs_mount);
    10251019            i = system(tmp1);
    10261020            mr_free(tmp1);
     
    10291023                retval++;
    10301024            } else {
    1031                 mr_asprintf(&tmp1, "mount | grep -E \"^%s[/]* .*\" | cut -d' ' -f3", bkpinfo->nfs_mount);
    1032                 strncpy(bkpinfo->isodir,
    1033                         call_program_and_get_last_line_of_output(tmp1),
    1034                         MAX_STR_LEN / 4);
     1025                mr_asprintf(tmp1, "mount | grep -E \"^%s[/]* .*\" | cut -d' ' -f3", bkpinfo->nfs_mount);
     1026                mr_free(bkpinfo->isodir);
     1027                mr_asprintf(tmp2, "%s", call_program_and_get_last_line_of_output(tmp1));
     1028                bkpinfo->isodir = tmp2;
    10351029                mr_free(tmp1);
    10361030
     
    10781072    if (flag_set['z']) {
    10791073        if (find_home_of_exe("getfattr")) {
    1080             mr_asprintf(&g_getfattr,"getfattr");
     1074            mr_asprintf(g_getfattr,"getfattr");
    10811075        }
    10821076        if (find_home_of_exe("getfacl")) {
    1083             mr_asprintf(&g_getfacl,"getfacl");
     1077            mr_asprintf(g_getfacl,"getfacl");
    10841078        }
    10851079    }
     
    10951089            log_to_screen("Please supply a sensible value with '-E'\n");
    10961090        }
    1097         mr_asprintf(&tmp1, "%s", flag_val['E']);
     1091        mr_asprintf(tmp1, "%s", flag_val['E']);
    10981092
    10991093        p = tmp1;
     
    11631157    if ((flag_set['N']) && (! bkpinfo->restore_data))       // exclude NFS mounts & devices
    11641158    {
    1165         mr_asprintf(&psz, "%s", list_of_NFS_mounts_only());
     1159        mr_asprintf(psz, "%s", list_of_NFS_mounts_only());
    11661160        mr_strcat(bkpinfo->exclude_paths, " %s ", psz);
    11671161        mr_free(psz);
     
    11731167
    11741168    if (flag_set['b']) {
    1175         mr_asprintf(&psz, "%s", flag_val['b']);
     1169        mr_asprintf(psz, "%s", flag_val['b']);
    11761170        log_msg(1, "psz = '%s'", psz);
    11771171        if (psz[strlen(psz) - 1] == 'k') {
     
    12191213            && !does_file_exist(bkpinfo->kernel_path)) {
    12201214            retval++;
    1221             mr_asprintf(&tmp1, "You specified kernel '%s', which does not exist\n", bkpinfo->kernel_path);
     1215            mr_asprintf(tmp1, "You specified kernel '%s', which does not exist\n", bkpinfo->kernel_path);
    12221216            log_to_screen(tmp1);
    12231217            mr_free(tmp1);
     
    12271221    if (flag_set['p']) {
    12281222        mr_free(bkpinfo->prefix);
    1229         mr_asprintf(&tmp1, "%s", flag_val['p']);
     1223        mr_asprintf(tmp1, "%s", flag_val['p']);
    12301224        bkpinfo->prefix = tmp1;
    12311225        log_msg(1,"Prefix forced to %s",bkpinfo->prefix);
     
    12341228    if (flag_set['d']) {        /* backup directory (if ISO/NFS) */
    12351229        if (flag_set['i']) {
    1236             strncpy(bkpinfo->isodir, flag_val['d'], MAX_STR_LEN / 4);
    1237             mr_asprintf(&tmp1, "ls -l %s", bkpinfo->isodir);
     1230            mr_free(bkpinfo->isodir);
     1231            mr_asprintf(tmp2, "%s", flag_val['d']);
     1232            bkpinfo->isodir = tmp2;
     1233            mr_asprintf(tmp1, "ls -l %s", bkpinfo->isodir);
    12381234            if (run_program_and_log_output(tmp1, 2)) {
    12391235                mr_free(tmp1);
    1240                 fatal_error
    1241                     ("output folder does not exist - please create it");
     1236                fatal_error("output folder does not exist - please create it");
    12421237            }
    12431238            mr_free(tmp1);
     
    12501245
    12511246    if ((flag_set['n']) && (! bkpinfo->restore_data)) {
    1252         mr_asprintf(&tmp1,"%s/%s/.dummy.txt", bkpinfo->isodir,bkpinfo->nfs_remote_dir);
     1247        mr_asprintf(tmp1,"%s/%s/.dummy.txt", bkpinfo->isodir,bkpinfo->nfs_remote_dir);
    12531248        if (bkpinfo->nfs_user) {
    1254             mr_asprintf(&tmp2, "su - %s -c \"echo hi > %s\"", bkpinfo->nfs_user, tmp1);
     1249            mr_asprintf(tmp2, "su - %s -c \"echo hi > %s\"", bkpinfo->nfs_user, tmp1);
    12551250        } else {
    1256             mr_asprintf(&tmp2, "echo hi > %s", tmp1);
     1251            mr_asprintf(tmp2, "echo hi > %s", tmp1);
    12571252        }
    12581253        i = run_program_and_log_output(tmp2, 2);
     
    12611256        if (i) {
    12621257            retval++;
    1263             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);
     1258            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);
    12641259            log_to_screen(tmp2);
    12651260            mr_free(tmp2);
     
    13021297
    13031298    if (flag_set['S']) {
    1304         mr_asprintf(&tmp1, "%s/mondo.scratch.%ld", flag_val['S'], random() % 32768);
     1299        mr_asprintf(tmp1, "%s/mondo.scratch.%ld", flag_val['S'], random() % 32768);
    13051300        mr_free(bkpinfo->scratchdir);
    13061301        bkpinfo->scratchdir = tmp1;
     
    13091304    if (flag_set['T']) {
    13101305        setup_tmpdir(flag_val['T']);
    1311         mr_asprintf(&tmp1, "touch %s/.foo.dat", bkpinfo->tmpdir);
     1306        mr_asprintf(tmp1, "touch %s/.foo.dat", bkpinfo->tmpdir);
    13121307        i = run_program_and_log_output(tmp1, 1);
    13131308        mr_free(tmp1);
     
    13181313            fatal_error("I cannot write to the tempdir you specified.");
    13191314        }
    1320         mr_asprintf(&tmp1, "ln -sf %s/.foo.dat %s/.bar.dat", bkpinfo->tmpdir, bkpinfo->tmpdir);
     1315        mr_asprintf(tmp1, "ln -sf %s/.foo.dat %s/.bar.dat", bkpinfo->tmpdir, bkpinfo->tmpdir);
    13211316        i = run_program_and_log_output(tmp1, 1);
    13221317        mr_free(tmp1);
     
    15151510            if (flag_set[opt]) {
    15161511                bad_switches = TRUE;
    1517                 mr_asprintf(&tmp, "Switch -%c previously defined as %s\n", opt, flag_val[opt]);
     1512                mr_asprintf(tmp, "Switch -%c previously defined as %s\n", opt, flag_val[opt]);
    15181513                log_to_screen(tmp);
    15191514                mr_free(tmp);
     
    15311526                        if (strchr(flag_val[opt], '/')
    15321527                            && flag_val[opt][0] != '/') {
    1533                             mr_asprintf(&tmp, "-%c flag --- must be absolute path --- '%s' isn't absolute", opt, flag_val[opt]);
     1528                            mr_asprintf(tmp, "-%c flag --- must be absolute path --- '%s' isn't absolute", opt, flag_val[opt]);
    15341529                            log_to_screen(tmp);
    15351530                            mr_free(tmp);
     
    15441539    for (i = optind; i < argc; i++) {
    15451540        bad_switches = TRUE;
    1546         mr_asprintf(&tmp, "Invalid arg -- %s\n", argv[i]);
     1541        mr_asprintf(tmp, "Invalid arg -- %s\n", argv[i]);
    15471542        log_to_screen(tmp);
    15481543        mr_free(tmp);
     
    15751570    switch (sig) {
    15761571    case SIGINT:
    1577         mr_asprintf(&tmp, "SIGINT");
    1578         mr_asprintf(&tmp2, "You interrupted me :-)");
     1572        mr_asprintf(tmp, "SIGINT");
     1573        mr_asprintf(tmp2, "You interrupted me :-)");
    15791574        break;
    15801575    case SIGKILL:
    1581         mr_asprintf(&tmp, "SIGKILL");
    1582         mr_asprintf(&tmp2, "I seriously have no clue how this signal even got to me. Something's wrong with your system.");
     1576        mr_asprintf(tmp, "SIGKILL");
     1577        mr_asprintf(tmp2, "I seriously have no clue how this signal even got to me. Something's wrong with your system.");
    15831578        break;
    15841579    case SIGTERM:
    1585         mr_asprintf(&tmp, "SIGTERM");
    1586         mr_asprintf(&tmp2, "Got terminate signal");
     1580        mr_asprintf(tmp, "SIGTERM");
     1581        mr_asprintf(tmp2, "Got terminate signal");
    15871582        break;
    15881583    case SIGHUP:
    1589         mr_asprintf(&tmp, "SIGHUP");
    1590         mr_asprintf(&tmp2, "Hangup on line");
     1584        mr_asprintf(tmp, "SIGHUP");
     1585        mr_asprintf(tmp2, "Hangup on line");
    15911586        break;
    15921587    case SIGSEGV:
    1593         mr_asprintf(&tmp, "SIGSEGV");
    1594         mr_asprintf(&tmp2, "Internal programming error. Please send a backtrace as well as your log.");
     1588        mr_asprintf(tmp, "SIGSEGV");
     1589        mr_asprintf(tmp2, "Internal programming error. Please send a backtrace as well as your log.");
    15951590        break;
    15961591    case SIGPIPE:
    1597         mr_asprintf(&tmp, "SIGPIPE");
    1598         mr_asprintf(&tmp2, "Pipe was broken");
     1592        mr_asprintf(tmp, "SIGPIPE");
     1593        mr_asprintf(tmp2, "Pipe was broken");
    15991594        break;
    16001595    case SIGABRT:
    1601         mr_asprintf(&tmp, "SIGABRT");
    1602         mr_asprintf(&tmp2, "Abort - probably failed assertion. I'm sleeping for a few seconds so you can read the message.");
     1596        mr_asprintf(tmp, "SIGABRT");
     1597        mr_asprintf(tmp2, "Abort - probably failed assertion. I'm sleeping for a few seconds so you can read the message.");
    16031598        break;
    16041599    default:
    1605         mr_asprintf(&tmp, "(Unknown)");
    1606         mr_asprintf(&tmp2, "(Unknown)");
     1600        mr_asprintf(tmp, "(Unknown)");
     1601        mr_asprintf(tmp2, "(Unknown)");
    16071602    }
    16081603
Note: See TracChangeset for help on using the changeset viewer.