Changeset 2190 in MondoRescue for branches/2.2.9/mondo/src/common/libmondo-filelist.c
- Timestamp:
- May 5, 2009, 3:56:10 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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 }
Note:
See TracChangeset
for help on using the changeset viewer.