Kern Sibbald <[EMAIL PROTECTED]> writes: > No, match_bsr.c is called for each record. You might take another > look at it and see if it would be possible to move the code from > read_record.c to match_bsr.c -- even if it takes a new subroutine > call. I haven't had a chance to look at that aspect yet, and I > would like to do so before applying the patch. The patch will > definitely go in, but exactly how needs to be examined.
I've had a look at it, and the only issue is keeping state across records. it needs to maintain a flag indicating whether the current fileindex should be kept or sent, and in addition the compiled regexp should be kept around since we really don't want to run regcomp for *every* file. the easy solution is to extend struct BSR -- perhaps a bit ugly, but there are already some members which are used for bookkeeping during the restore, and aren't part of the bootstrap definition per se. BTW, there is a hidden assumption that the "Unix attributes" will be the first record. I think this is OK, since it's awkward for the FD to store the file content without knowing the filename in advance (even if it uses a temporary file, it can't assume that the destination is a single filesystem, and rename(2) will fail if it isn't.) I'll send an updated patch later this week (I'll also rename the keyword to FileRegex as requested). -- regards, Kjetil T. Homme Linpro AS ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Bacula-devel mailing list Bacula-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-devel