Changeset 839 in MondoRescue for trunk/mondo/src/common/libmondo-filelist.c
- Timestamp:
- Sep 26, 2006, 9:47:32 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/mondo/src/common/libmondo-filelist.c
r795 r839 17 17 #include "newt-specific-EXT.h" 18 18 #include "libmondo-tools-EXT.h" 19 19 #include "mr_string.h" 20 20 21 21 #include <time.h> … … 1318 1318 char *skeleton_filelist) 1319 1319 { 1320 const char delims[] = " "; 1320 1321 DIR *dip = NULL; 1321 1322 struct dirent *dit = NULL; 1323 1322 1324 struct stat statbuf; 1323 1325 char *new = NULL; … … 1329 1331 static char *name_of_evalcall_form = NULL; 1330 1332 int i = 0; 1333 char *strtmp = NULL; 1334 char *token = NULL; 1335 char *find_excludes = NULL; 1336 int lastpos = 0; 1331 1337 static int depth = 0; 1332 1338 char *p = NULL; … … 1347 1353 if (!depth) { 1348 1354 malloc_string(find_skeleton_marker); 1355 asprintf(&find_excludes, " "); 1356 while((token = mr_strtok (sth, delims, &lastpos))) { 1357 asprintf(&strtmp,"%s", find_excludes); 1358 paranoid_free(find_excludes); 1359 asprintf(&find_excludes,"%s -path %s -prune -o", strtmp, token); 1360 paranoid_free(strtmp); 1361 paranoid_free(token); 1362 } 1349 1363 #if linux 1350 1364 // 2.6 has /sys as a proc-type thing -- must be excluded 1351 asprintf(& tmp,1352 "find %s -maxdepth %d -fstype mvfs -prune -o -fstype afs -prune -o -path /proc -prune -o -path /sys -prune -o -path /dev/shm -prune -o -path /media/floppy -prune -o -type d -a-print > %s 2> /dev/null",1353 dir, MAX_SKEL_DEPTH,skeleton_filelist);1365 asprintf(&strtmp, 1366 "find %s -maxdepth %d -fstype mvfs -prune -o -path /dev/shm -prune -o %s -type d -print > %s 2> /dev/null", 1367 dir, MAX_SKEL_DEPTH, find_excludes, g_skeleton_filelist); 1354 1368 #else 1355 1369 // On BSD, for example, /sys is the kernel sources -- don't exclude 1356 asprintf(&tmp, 1357 "find %s -maxdepth %d -fstype mvfs -prune -o -fstype afs -prune -o -path /proc -prune -o -type d -a -print > %s 2> /dev/null", 1358 dir, MAX_SKEL_DEPTH, skeleton_filelist); 1370 asprintf(&strtmp, 1371 "find %s -maxdepth %d -fstype mvfs -prune -o -path /proc -prune -o %s -type d -print > %s 2> /dev/null", 1372 dir, MAX_SKEL_DEPTH, find_excludes, g_skeleton_filelist); 1373 >>>>>>> .merge-right.r838 1359 1374 #endif 1360 system(tmp); 1375 paranoid_free(find_excludes); 1376 log_msg(5, "find command = %s", strtmp); 1377 system(strtmp); 1378 paranoid_free(strtmp); 1361 1379 paranoid_free(tmp); 1362 1380
Note:
See TracChangeset
for help on using the changeset viewer.