Changeset 2323 in MondoRescue for branches/2.2.10/mondo/src/common/libmondo-cli.c
- Timestamp:
- Aug 18, 2009, 3:05:43 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.10/mondo/src/common/libmondo-cli.c
r2322 r2323 111 111 for (i = 0; i < 128; i++) { 112 112 if (flag_set[i]) { 113 mr_asprintf( &tmp, "-%c %s", i, flag_val[i]);113 mr_asprintf(tmp, "-%c %s", i, flag_val[i]); 114 114 log_msg(3, tmp); 115 115 mr_free(tmp); 116 116 } 117 117 } 118 mr_asprintf( &tmp, "rm -Rf %s/tmp.mondo.*", bkpinfo->tmpdir);118 mr_asprintf(tmp, "rm -Rf %s/tmp.mondo.*", bkpinfo->tmpdir); 119 119 paranoid_system(tmp); 120 120 mr_free(tmp); 121 121 122 mr_asprintf( &tmp, "rm -Rf %s/mondo.scratch.*", bkpinfo->scratchdir);122 mr_asprintf(tmp, "rm -Rf %s/mondo.scratch.*", bkpinfo->scratchdir); 123 123 paranoid_system(tmp); 124 124 mr_free(tmp); … … 126 126 mr_strcat(bkpinfo->scratchdir, "/mondo.scratch.%ld", random() % 32767); 127 127 128 mr_asprintf( &tmp, "mkdir -p %s/tmpfs", bkpinfo->tmpdir);128 mr_asprintf(tmp, "mkdir -p %s/tmpfs", bkpinfo->tmpdir); 129 129 paranoid_system(tmp); 130 130 mr_free(tmp); 131 131 132 mr_asprintf( &tmp, "mkdir -p %s", bkpinfo->scratchdir);132 mr_asprintf(tmp, "mkdir -p %s", bkpinfo->scratchdir); 133 133 paranoid_system(tmp); 134 134 mr_free(tmp); … … 161 161 *(strchr(tmp, ',')) = '\0'; 162 162 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]); 164 164 log_msg(3, comment); 165 165 mr_free(comment); … … 279 279 ********/ 280 280 /* 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"); 282 282 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)); 284 284 mr_free(command); 285 285 … … 289 289 290 290 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); 292 292 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)); 294 294 mr_free(command); 295 295 … … 373 373 log_msg(5, " %s looks like a device special file", dsf); 374 374 /* 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); 376 376 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)); 378 378 mr_free(command); 379 379 … … 399 399 * Either way, it's an error. 400 400 ********/ 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); 402 402 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)); 404 404 mr_free(command); 405 405 log_msg(4, "Partition list for %s: %s", dsf, partition_list); … … 452 452 log_msg(4, "Processing partition: %s", partitions[i]); 453 453 /* 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}}'", 455 455 dsf, partitions[i]); 456 456 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)); 458 458 mr_free(command); 459 459 … … 467 467 } 468 468 /* 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)); 471 471 mr_free(command); 472 472 … … 486 486 log_msg(4, " It's not mounted. Checking to see if it's LVM..."); 487 487 /* 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]); 489 489 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)); 491 491 mr_free(command); 492 492 if (strlen(tmp)) { … … 495 495 /* It's LVM: Find the VG it's in */ 496 496 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]); 498 498 log_msg(4, " Running: %s", command); 499 499 strcpy(VG, call_program_and_get_last_line_of_output(command)); … … 503 503 /* Found the Volume Group. Now find all of the VG's mount points */ 504 504 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); 506 506 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)); 508 508 mr_free(command); 509 509 log_msg(4, " VG %s mount_list: %s", VG, mount_list); … … 525 525 *******/ 526 526 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 \"\"}'"); 528 528 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)); 530 530 mr_free(command); 531 531 log_msg(4, " Software raid device list: %s", mount_list); 532 532 lastpos = 0; 533 533 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); 535 535 log_msg (5, "Running: %s", command); 536 536 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)); 538 538 mr_free(command); 539 539 log_msg(4, "Number of Software raid device: %s", tmp); … … 567 567 ********/ 568 568 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]); 570 570 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)); 572 572 mr_free(command); 573 573 if (!strlen(tmp)) { … … 578 578 log_msg (5, " UUID: %s", tmp); 579 579 /* 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 \"\"}'"); 581 581 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)); 583 583 mr_free(command); 584 584 log_msg(4, " Software raid device list: %s", mount_list); … … 586 586 lastpos = 0; 587 587 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); 589 589 log_msg(4, " Running: %s", command); 590 590 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)); 592 592 mr_free(command); 593 593 if (!atoi(tmp)) { … … 760 760 } 761 761 762 mr_asprintf( &tmp1, "%s", flag_val['I']);762 mr_asprintf(tmp1, "%s", flag_val['I']); 763 763 p = tmp1; 764 764 q = tmp1; … … 797 797 log_to_screen("Archiving only the following file systems on %s:\n", token); 798 798 log_to_screen(" %s\n", mounted_on_dsf); 799 mr_asprintf( &p, "/");799 mr_asprintf(p, "/"); 800 800 mr_free(bkpinfo->include_paths); 801 801 bkpinfo->include_paths = p; … … 837 837 } 838 838 bkpinfo->make_filelist = FALSE; 839 mr_asprintf( &p, "%s", flag_val['J']);839 mr_asprintf(p, "%s", flag_val['J']); 840 840 mr_free(bkpinfo->include_paths); 841 841 bkpinfo->include_paths = p; … … 903 903 strcpy(flag_val['d'], p); 904 904 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']); 906 906 log_to_screen(tmp1); 907 907 mr_free(tmp1); … … 954 954 } 955 955 } 956 /*957 if (flag_set['Z']) {958 bkpinfo->blank_dvd_first = TRUE;959 }960 */961 956 } 962 957 … … 1009 1004 p--; 1010 1005 *p = '\0'; 1011 mr_asprintf( &q,"%s",bkpinfo->nfs_mount);1006 mr_asprintf(q,"%s",bkpinfo->nfs_mount); 1012 1007 bkpinfo->nfs_user = q; 1013 1008 strcpy(bkpinfo->nfs_mount,tmp); 1014 1009 } 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; 1020 1014 mr_free(tmp1); 1021 1015 1022 1016 if (strlen(bkpinfo->isodir) < 3) { 1023 1017 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); 1025 1019 i = system(tmp1); 1026 1020 mr_free(tmp1); … … 1029 1023 retval++; 1030 1024 } 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; 1035 1029 mr_free(tmp1); 1036 1030 … … 1078 1072 if (flag_set['z']) { 1079 1073 if (find_home_of_exe("getfattr")) { 1080 mr_asprintf( &g_getfattr,"getfattr");1074 mr_asprintf(g_getfattr,"getfattr"); 1081 1075 } 1082 1076 if (find_home_of_exe("getfacl")) { 1083 mr_asprintf( &g_getfacl,"getfacl");1077 mr_asprintf(g_getfacl,"getfacl"); 1084 1078 } 1085 1079 } … … 1095 1089 log_to_screen("Please supply a sensible value with '-E'\n"); 1096 1090 } 1097 mr_asprintf( &tmp1, "%s", flag_val['E']);1091 mr_asprintf(tmp1, "%s", flag_val['E']); 1098 1092 1099 1093 p = tmp1; … … 1163 1157 if ((flag_set['N']) && (! bkpinfo->restore_data)) // exclude NFS mounts & devices 1164 1158 { 1165 mr_asprintf( &psz, "%s", list_of_NFS_mounts_only());1159 mr_asprintf(psz, "%s", list_of_NFS_mounts_only()); 1166 1160 mr_strcat(bkpinfo->exclude_paths, " %s ", psz); 1167 1161 mr_free(psz); … … 1173 1167 1174 1168 if (flag_set['b']) { 1175 mr_asprintf( &psz, "%s", flag_val['b']);1169 mr_asprintf(psz, "%s", flag_val['b']); 1176 1170 log_msg(1, "psz = '%s'", psz); 1177 1171 if (psz[strlen(psz) - 1] == 'k') { … … 1219 1213 && !does_file_exist(bkpinfo->kernel_path)) { 1220 1214 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); 1222 1216 log_to_screen(tmp1); 1223 1217 mr_free(tmp1); … … 1227 1221 if (flag_set['p']) { 1228 1222 mr_free(bkpinfo->prefix); 1229 mr_asprintf( &tmp1, "%s", flag_val['p']);1223 mr_asprintf(tmp1, "%s", flag_val['p']); 1230 1224 bkpinfo->prefix = tmp1; 1231 1225 log_msg(1,"Prefix forced to %s",bkpinfo->prefix); … … 1234 1228 if (flag_set['d']) { /* backup directory (if ISO/NFS) */ 1235 1229 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); 1238 1234 if (run_program_and_log_output(tmp1, 2)) { 1239 1235 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"); 1242 1237 } 1243 1238 mr_free(tmp1); … … 1250 1245 1251 1246 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); 1253 1248 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); 1255 1250 } else { 1256 mr_asprintf( &tmp2, "echo hi > %s", tmp1);1251 mr_asprintf(tmp2, "echo hi > %s", tmp1); 1257 1252 } 1258 1253 i = run_program_and_log_output(tmp2, 2); … … 1261 1256 if (i) { 1262 1257 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); 1264 1259 log_to_screen(tmp2); 1265 1260 mr_free(tmp2); … … 1302 1297 1303 1298 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); 1305 1300 mr_free(bkpinfo->scratchdir); 1306 1301 bkpinfo->scratchdir = tmp1; … … 1309 1304 if (flag_set['T']) { 1310 1305 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); 1312 1307 i = run_program_and_log_output(tmp1, 1); 1313 1308 mr_free(tmp1); … … 1318 1313 fatal_error("I cannot write to the tempdir you specified."); 1319 1314 } 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); 1321 1316 i = run_program_and_log_output(tmp1, 1); 1322 1317 mr_free(tmp1); … … 1515 1510 if (flag_set[opt]) { 1516 1511 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]); 1518 1513 log_to_screen(tmp); 1519 1514 mr_free(tmp); … … 1531 1526 if (strchr(flag_val[opt], '/') 1532 1527 && 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]); 1534 1529 log_to_screen(tmp); 1535 1530 mr_free(tmp); … … 1544 1539 for (i = optind; i < argc; i++) { 1545 1540 bad_switches = TRUE; 1546 mr_asprintf( &tmp, "Invalid arg -- %s\n", argv[i]);1541 mr_asprintf(tmp, "Invalid arg -- %s\n", argv[i]); 1547 1542 log_to_screen(tmp); 1548 1543 mr_free(tmp); … … 1575 1570 switch (sig) { 1576 1571 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 :-)"); 1579 1574 break; 1580 1575 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."); 1583 1578 break; 1584 1579 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"); 1587 1582 break; 1588 1583 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"); 1591 1586 break; 1592 1587 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."); 1595 1590 break; 1596 1591 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"); 1599 1594 break; 1600 1595 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."); 1603 1598 break; 1604 1599 default: 1605 mr_asprintf( &tmp, "(Unknown)");1606 mr_asprintf( &tmp2, "(Unknown)");1600 mr_asprintf(tmp, "(Unknown)"); 1601 mr_asprintf(tmp2, "(Unknown)"); 1607 1602 } 1608 1603
Note:
See TracChangeset
for help on using the changeset viewer.