search for: f_name_to

Displaying 9 results from an estimated 9 matches for "f_name_to".

2004 Jul 11
0
[PATCH] [TRIVIAL] whitespace + variable rename
...f, struct file_list *flist, char *local_name) { int i; int phase = 0; --- 545,551 ---- } ! void generate_files(int f_out, struct file_list *flist, char *local_name) { int i; int phase = 0; *************** *** 584,590 **** } recv_generator(local_name ? local_name : f_name_to(file, fbuf), ! file, i, f); } phase++; --- 586,592 ---- } recv_generator(local_name ? local_name : f_name_to(file, fbuf), ! file, i, f_out); } phase++; *************** *** 594,614 **** if (verbose > 2) rprintf(FINFO,"generate_files pha...
2004 Jan 19
3
Improving name-truncation detection
I've got a patch that changes f_name_to() to return an unsigned int (like snprintf() and strlcpy() do) and adds checking to ensure that we didn't overflow the name before we try to use it: http://www.blorf.net/name-overflow.patch If anyone would care to check out the following patch before I commit it, please do. ..wayne..
2004 Jan 25
2
scan for first existing hard-link file
...{ #if SUPPORT_HARD_LINKS - struct file_struct *file; + struct file_struct *file, *first; char hlink1[MAXPATHLEN]; char *hlink2; STRUCT_STAT st1, st2; @@ -146,10 +147,10 @@ void do_hard_links(void) return; for (i = 0; i < hlink_count; i++) { - file = hlink_list[i]; - if (link_stat(f_name_to(file, hlink1), &st1) != 0) + first = file = hlink_list[i]; + if (link_stat(f_name_to(first, hlink1), &st1) != 0) continue; - while ((file = file->F_NEXT) != NULL) { + while ((file = file->F_NEXT) != first) { hlink2 = f_name(file); if (link_stat(hlink2, &st2) == 0)...
2005 Oct 27
0
Converting OS X UTF-8 NFD to UTF-8 NFC
...sync-2.6.6/flist.c 2005-07-07 15:49:14.000000000 -0400 +++ rsync-2.6.6-nfc/flist.c 2005-10-26 15:18:01.000000000 -0400 @@ -1748,8 +1748,11 @@ * buffer. No size-checking is done because we checked the size when creating * the file_struct entry. */ +#include <stringprep.h> char *f_name_to(struct file_struct *f, char *fbuf) { + char *norm; + if (!f || !f->basename) return NULL; @@ -1760,6 +1763,11 @@ strcpy(fbuf + len + 1, f->basename); } else strcpy(fbuf, f->basename); + + norm = stringprep_...
2005 Mar 02
0
[Bug 2408] New: when more than --max-delete files are about to be deleted no error is returned
...st_count=0; + + for (j = 0; j < flist->count; j++) { + if (!(flist->files[j]->flags & FLAG_TOP_DIR) + || !S_ISDIR(flist->files[j]->mode)) + continue; + + argv[0] = f_name_to(flist->files[j], fbuf); + + if (!(local_file_list = send_file_list(-1, 1, argv))) + continue; + + for (i = local_file_list->count-1; i >= 0; i--) { + if (!local_file_list->files[i]-&g...
2004 May 29
1
[patch] Filename conversion
...e_struct static uid_t uid; static gid_t gid; static char lastname[MAXPATHLEN]; - char *fname, fbuf[MAXPATHLEN]; + char fname[MAXPATHLEN]; int l1, l2; if (f == -1) @@ -351,7 +351,11 @@ void send_file_entry(struct file_struct io_write_phase = "send_file_entry"; - fname = f_name_to(file, fbuf); + if (am_server) + f_name_to(file, fname); /* fname conversion always done on client */ + else + convert_fname(fname, f_name(file), MAXPATHLEN); + flags = base_flags; @@ -563,6 +567,9 @@ void receive_file_entry(struct file_stru strlcpy(lastname, thisname, MAXPATHLEN); +...
2004 Jan 17
1
--delete-sent-files (AKA --move-files)
...n; + + file = the_flist->files[i]; + if (!(file->flags & FLAG_SENT)) + return; /* We didn't send it -- impossible! */ + if (file->basedir) { + /* We know the name fits because we already sent it. */ + offset = snprintf(fname, MAXPATHLEN, "%s/", file->basedir); + } + f_name_to(file, fname + offset, MAXPATHLEN - offset); + if (delete_sent_files && do_unlink(fname) == 0 && verbose > 0) + rprintf(FINFO, "sender removed %s\n", fname + offset); +} void send_files(struct file_list *flist, int f_out, int f_in) { @@ -129,6 +151,8 @@ void send_fi...
2004 Apr 09
3
include/exclude bug in rsync 2.6.0/2.6.1pre1
...11 @@ if (recursive && S_ISDIR(file->mode) && !(file->flags & FLAG_MOUNT_POINT)) { struct exclude_struct **last_exclude_list = local_exclude_list; + struct exclude_struct **recur_last_exclude_list = + recur_local_exclude_list; send_directory(f, flist, f_name_to(file, fbuf)); local_exclude_list = last_exclude_list; + recur_local_exclude_list = recur_last_exclude_list; return; } } @@ -963,6 +1002,7 @@ } local_exclude_list = NULL; + recur_local_exclude_list = copy_exclude_list(recur_local_exclude_list); if (cvs_exclude) { if (strlcpy(...
2004 Feb 06
4
memory reduction
...file_struct *file, int free_the_struct); -struct file_list *flist_new(void); +void clear_file(int i, struct file_list *flist); +struct file_list *flist_new(int with_hlink, char *msg); void flist_free(struct file_list *flist); int f_name_cmp(struct file_struct *f1, struct file_struct *f2); char *f_name_to(struct file_struct *f, char *fbuf); diff -rupNP --exclude-from cvs/.ignore cvs/receiver.c pool2/receiver.c --- cvs/receiver.c Wed Feb 4 03:49:36 2004 +++ pool2/receiver.c Wed Feb 4 03:08:45 2004 @@ -305,6 +305,12 @@ int recv_files(int f_in,struct file_list rprintf(FINFO,"recv_files(%d) st...