Changeset 2190 in MondoRescue
- Timestamp:
- May 5, 2009, 3:56:10 AM (16 years ago)
- Location:
- branches/2.2.9
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.9/mindi/mindi
r2183 r2190 1425 1425 MindiExit -1 1426 1426 fi 1427 echo "The USB device $USBDEVICE now looks like this:" >> $LOGFILE 1428 $FDISK -l $USBDEVICE 2>&1 | tee -a $LOGFILE 1427 1429 echo -en "." 1428 1430 echo "Creating a vfat filesystem on $USBPART" >> $LOGFILE -
branches/2.2.9/mondo/configure.in
r1989 r2190 72 72 AC_CHECK_LIB(pthread, pthread_create, true, [echo "*** Cannot find -lpthread."; echo "*** Please make sure you have the linuxthreads glibc add-on installed."; exit 1]) 73 73 PTHREAD="-lpthread" 74 CFLAGS="$CFLAGS -Wall -Wno-return-type - D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_REENTRANT"74 CFLAGS="$CFLAGS -Wall -Wno-return-type -Werror=format-security -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_REENTRANT" 75 75 ;; 76 76 *) -
branches/2.2.9/mondo/src/common/libmondo-archive.c
r2160 r2190 641 641 } 642 642 #else 643 /* Linux */ 643 644 #ifdef __IA64__ 644 645 strcpy(bootdev, call_program_and_get_last_line_of_output … … 665 666 } 666 667 } 668 /* Linux */ 667 669 #endif 668 670 if (bootdev[0]) … … 1221 1223 sprintf(data_disks_file, "%s/all.tar.gz", bkpinfo->tmpdir); 1222 1224 1223 snprintf(g_serial_string, MAX_STR_LEN - 1,1225 snprintf(g_serial_string, MAX_STR_LEN - 8, "%s", 1224 1226 call_program_and_get_last_line_of_output("dd \ 1225 1227 if=/dev/urandom bs=16 count=1 2> /dev/null | \ -
branches/2.2.9/mondo/src/common/libmondo-cli.c
r2134 r2190 395 395 "fdisk -l %s 2>/dev/null|grep -E \"^/dev/\"|awk '{printf(\"%%s \", $1)}END{print \"\"}'", dsf); 396 396 log_msg(4, "Executing: %s", command); 397 asprintf(&partition_list, call_program_and_get_last_line_of_output(command));397 asprintf(&partition_list, "%s", call_program_and_get_last_line_of_output(command)); 398 398 paranoid_free(command); 399 399 log_msg(4, "Partition list for %s: %s", dsf, partition_list); … … 498 498 VG, VG); 499 499 log_msg(4, " Running: %s", command); 500 asprintf(&mount_list, call_program_and_get_last_line_of_output(command));500 asprintf(&mount_list, "%s", call_program_and_get_last_line_of_output(command)); 501 501 paranoid_free(command); 502 502 log_msg(4, " VG %s mount_list: %s", VG, mount_list); … … 519 519 "cat /proc/mdstat|grep -iv Personal|awk '{if($0~\"^.*[ ]+:\"){printf(\"/dev/%s \", $1)}}END{print \"\"}'"); 520 520 log_msg (5, "Running: %s", command); 521 asprintf(&mount_list, call_program_and_get_last_line_of_output(command));521 asprintf(&mount_list, "%s", call_program_and_get_last_line_of_output(command)); 522 522 paranoid_free(command); 523 523 log_msg(4, " Software raid device list: %s", mount_list); … … 571 571 "cat /proc/mdstat|grep -iv Personal|awk '{if($0~\"^.*[ ]+:\"){printf(\"/dev/%s \", $1)}}END{print \"\"}'"); 572 572 log_msg (5, " Running: %s", command); 573 asprintf(&mount_list, call_program_and_get_last_line_of_output(command));573 asprintf(&mount_list, "%s", call_program_and_get_last_line_of_output(command)); 574 574 paranoid_free(command); 575 575 log_msg(4, " Software raid device list: %s", mount_list); … … 756 756 } 757 757 758 asprintf(&tmp1, flag_val['I']);758 asprintf(&tmp1, "%s", flag_val['I']); 759 759 p = tmp1; 760 760 q = tmp1; … … 1055 1055 strcat(bkpinfo->exclude_paths, " "); 1056 1056 } 1057 asprintf(&tmp1, flag_val['E']);1057 asprintf(&tmp1, "%s", flag_val['E']); 1058 1058 1059 1059 p = tmp1; -
branches/2.2.9/mondo/src/common/libmondo-devices.c
r2187 r2190 902 902 } 903 903 904 sprintf(tmp, call_program_and_get_last_line_of_output904 sprintf(tmp, "%s", call_program_and_get_last_line_of_output 905 905 ("dvdrecord -scanbus 2> /dev/null | grep \") '\" | grep -n \"\" | grep DVD | cut -d':' -f1") 906 906 ); 907 907 log_msg(5, "tmp = '%s'", tmp); 908 908 if (!tmp[0]) 909 sprintf(tmp, call_program_and_get_last_line_of_output909 sprintf(tmp, "%s", call_program_and_get_last_line_of_output 910 910 ("cdrecord -scanbus 2> /dev/null | grep \") '\" | grep -n \"\" | grep DVD | cut -d':' -f1") 911 911 ); -
branches/2.2.9/mondo/src/common/libmondo-filelist.c
r2184 r2190 26 26 #include <errno.h> 27 27 #include <stdio.h> 28 29 30 /**31 * The maximum depth of directories to put in the skeleton filelist.32 * This is a balance between performance and a good progress indicator.33 */34 #define MAX_SKEL_DEPTH 335 28 36 29 … … 1406 1399 asprintf(&strtmp, 1407 1400 "find %s -fstype mvfs -prune -o -fstype devpts -prune -o -fstype tmpfs -prune -o -fstype proc -prune -o -fstype sysfs -prune -o %s -type d -print > %s 2> /dev/null", 1408 dir, MAX_SKEL_DEPTH,find_excludes, g_skeleton_filelist);1401 dir, find_excludes, g_skeleton_filelist); 1409 1402 #else 1410 1403 // On BSD, for example, /sys is the kernel sources -- don't exclude 1411 1404 asprintf(&strtmp, 1412 "find %s - maxdepth %d -fstype mvfs -prune -o -path /proc -prune -o %s -type d -print > %s 2> /dev/null",1413 dir, MAX_SKEL_DEPTH,find_excludes, g_skeleton_filelist);1405 "find %s -fstype mvfs -prune -o -path /proc -prune -o %s -type d -print > %s 2> /dev/null", 1406 dir, find_excludes, g_skeleton_filelist); 1414 1407 #endif 1415 1408 paranoid_free(find_excludes); … … 1427 1420 log_msg(5, "entries = %ld", g_skeleton_entries); 1428 1421 percentage = 0; 1429 } else if (depth <= MAX_SKEL_DEPTH)// update evalcall form if appropriate1422 } else // update evalcall form if appropriate 1430 1423 { 1431 1424 sprintf(find_skeleton_marker, … … 1650 1643 log_msg(2, "include_paths = '%s'", include_paths); 1651 1644 log_msg(1, "Calculating filelist"); 1652 asprintf(&tmp2, call_program_and_get_last_line_of_output("mount | grep -Ew 'ntfs|ntfs-3g|fat|vfat|dos' | awk '{print $3}'"));1645 asprintf(&tmp2, "%s", call_program_and_get_last_line_of_output("mount | grep -Ew 'ntfs|ntfs-3g|fat|vfat|dos' | awk '{print $3}'")); 1653 1646 if (strlen(tmp2) < 1) { 1654 1647 asprintf(&tmp1," "); … … 1657 1650 asprintf(&tmp1, "find %s -name '/win386.swp' -o -name '/hiberfil.sys' -o -name '/pagefile.sys' 2> /dev/null\n",tmp2); 1658 1651 paranoid_free(tmp2); 1659 asprintf(&tmp2, call_program_and_get_last_line_of_output(tmp1));1652 asprintf(&tmp2, "%s", call_program_and_get_last_line_of_output(tmp1)); 1660 1653 log_msg(2, "Found windows files: %s",tmp2); 1661 1654 } -
branches/2.2.9/mondo/src/common/libmondo-raid.c
r1261 r2190 1043 1043 pos = string; 1044 1044 while (*pos == ' ') pos += 1; 1045 asprintf(&strtmp, pos);1045 asprintf(&strtmp, "%s", pos); 1046 1046 strcpy(string, strtmp); 1047 1047 paranoid_free(strtmp); -
branches/2.2.9/mondo/src/common/libmondo-string.c
r2125 r2190 875 875 } else { 876 876 /* Some full devices like this /dev/mapper/mpath0 877 */dev/cciss/c0d0 may be used as partition names */877 /dev/cciss/c0d0 may be used as partition names */ 878 878 if ((strstr(partition,"/dev/mapper/mpath") != NULL) || 879 879 (strstr(partition,"/dev/cciss/c") != NULL) || -
branches/2.2.9/mondo/src/common/libmondo-tools.c
r2160 r2190 232 232 233 233 uname(&utsn); 234 asprintf(&tmp, utsn.machine);234 asprintf(&tmp, "%s", utsn.machine); 235 235 return (tmp); 236 236 } -
branches/2.2.9/mondo/src/mondorestore/mondo-prep.c
r2188 r2190 596 596 } 597 597 // create device list from normal disks followed by spare ones 598 asprintf(&devices, raidlist->el[i].data_disks.el[0].device);598 asprintf(&devices, "%s", raidlist->el[i].data_disks.el[0].device); 599 599 for (j = 1; j < raidlist->el[i].data_disks.entries; j++) { 600 600 asprintf(&strtmp, "%s", devices); … … 2151 2151 } else { 2152 2152 res = 0; 2153 fprintf(fout, output);2153 fprintf(fout, "%s", output); 2154 2154 paranoid_pclose(fout); 2155 2155 }
Note:
See TracChangeset
for help on using the changeset viewer.