search for: flist_free

Displaying 6 results from an estimated 6 matches for "flist_free".

2008 Mar 19
0
[PATCH] Unsnarl missing_below/dry_run logic.
...02,8 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx, #ifdef SUPPORT_XATTRS sx.xattr = NULL; #endif - if (dry_run > 1) { + if (dry_run > 1 || (dry_missing_dir && is_below(file, dry_missing_dir))) { + parent_is_dry_missing: if (fuzzy_dirlist) { flist_free(fuzzy_dirlist); fuzzy_dirlist = NULL; @@ -1307,14 +1312,18 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx, statret = -1; stat_errno = ENOENT; } else { + dry_missing_dir = NULL; const char *dn = file->dirname ? file->dirname : "."; if...
2005 Mar 02
0
[Bug 2408] New: when more than --max-delete files are about to be deleted no error is returned
...(!local_file_list->files[i]->basename) + continue; + if (flist_find(flist,local_file_list->files[i]) < 0) + deletion_test_count++; + } + flist_free(local_file_list); + } + + /* check deletion count */ + if ((deletion_count+deletion_test_count) >= max_delete) { + rprintf(FERROR,"too many files would be deleted - skipping file deletion\n"); + retur...
2004 Mar 10
4
HFS+ resource forks: WIP patch included
...e_list(int f, int argc, char *argv[]); +struct file_list *recv_file_list(int f); +int file_compare(struct file_struct **f1, struct file_struct **f2); +int flist_find(struct file_list *flist, struct file_struct *f); +void free_file(struct file_struct *file); +struct file_list *flist_new(void); +void flist_free(struct file_list *flist); +char *f_name(struct file_struct *f); +char *f_name_dst(struct file_struct *f); +void show_flist_stats(void); +int readlink_stat(const char *path, STRUCT_STAT * buffer, char *linkbuf); +int link_stat(const char *path, STRUCT_STAT * buffer); +struct file_struct *make_file(c...
2004 Feb 06
4
memory reduction
...+ +#if SUPPORT_HARD_LINKS + if (with_hlink && preserve_hard_links) { + if (!(flist->hlink_pool = pool_create(HLINK_EXTENT, 0, + out_of_memory, POOL_INTERN))) + out_of_memory(msg); + } +#endif return flist; } @@ -1374,9 +1402,8 @@ struct file_list *flist_new(void) */ void flist_free(struct file_list *flist) { - int i; - for (i = 1; i < flist->count; i++) - free_file(flist->files[i], FREE_STRUCT); + pool_destroy(flist->file_pool); + pool_destroy(flist->hlink_pool); free(flist->files); free(flist); } @@ -1416,7 +1443,8 @@ static void clean_flist(struct f...
2003 Sep 05
1
new option suggestion '--backup-only'
...) + if (verbose && !backup_only) rprintf(FINFO, "deleting %s\n", f); } else { int mode = local_file_list->files[i]->mode; delete_one(f, S_ISDIR(mode) != 0); } - deletion_count++; + if (!backup_only) + deletion_count++; } } flist_free(local_file_list); @@ -535,15 +537,17 @@ } } - if (preserve_hard_links) - do_hard_links(); - - /* now we need to fix any directory permissions that were - modified during the transfer */ - for (i = 0; i < flist->count; i++) { - file = flist->files[i]; - if (!file->basename...
2003 Mar 30
1
[RFC][patch] dynamic rolling block and sum sizes II
...ngth */ + size_t blength; /**< block_length */ + size_t s2length; /**< sum2_length */ struct sum_buf *sums; /**< points to info for each chunk */ }; --- proto.h Sat Mar 29 12:18:02 2003 +++ proto.h Sat Mar 29 12:15:38 2003 @@ -91,6 +91,7 @@ struct file_list *flist_new(void); void flist_free(struct file_list *flist); char *f_name(struct file_struct *f); +void write_sum_head(int f, struct sum_struct *sum); void recv_generator(char *fname, struct file_list *flist, int i, int f_out); void generate_files(int f,struct file_list *flist,char *local_name,int f_recv); int main(int argc, cha...