aboutsummaryrefslogtreecommitdiffstats
path: root/hlink.c
Commit message (Collapse)AuthorAgeFilesLines
...
* Got rid of the code that sorted based on struct idev objects sinceWayne Davison2006-12-171-71/+6
| | | | we always use a hardlinked group-number now.
* Added a simple hashtable routine for hashing st_dev and st_ino infoWayne Davison2006-12-151-25/+240
| | | | | | on the sending side, and the support routines for the receiving side that handle using a "group number" for each hard-link cluster rather than having to manage a pool of dev+inode data. (For protocol 30)
* - Revamped the hard-link algorithm to save memory.Wayne Davison2006-12-091-189/+193
| | | | | | | | | - Improved the function names. - Improved a few variable names. - Got rid of the "is a hard link" message in favor of the normal status messages for files (e.g. --itemize-changes indicates hard-links). - Fixed a long-standing bug when combining -H with --compare-dest. - Made sure that code compiles when hard-linking is not available.
* - Use renamed hard-link defines: F_HL_IDEV() and F_HL_LIST().Wayne Davison2006-12-071-11/+11
|
* - Make some char* pointers const.Wayne Davison2006-12-061-26/+15
| | | | | | - Tweaked a couple variable names. - Changed the #ifdefs to not define any hard-link functions when hard-linking is disabled.
* Use the latest F_*() accessors.Wayne Davison2006-12-051-3/+2
|
* Use new send_msg_int() function.Wayne Davison2006-12-041-12/+6
|
* - Typical tranfers now save 12-20 bytes per file because several varsWayne Davison2006-12-031-46/+63
| | | | | | | were moved out of file_struct into an optional member-var setup. - Renamed and reorganized the FLAG_* defines. - Use NDX_DONE instead of a literal -1 when sending/checking the end-of-phase index value.
* Added "const" to appropriate char pointers.Wayne Davison2006-11-191-2/+1
|
* Make sure the new link_dest_used value gets zeroed on init.Wayne Davison2006-10-171-0/+2
|
* Use new FNONE value when setting/comparing enum logcode vars.Wayne Davison2006-10-131-3/+5
|
* - If a finished link came from a link-dest dir and --dry-run is inWayne Davison2006-10-091-6/+12
| | | | | | effect, we now stat the link-dest file instead of the non-existent destination file. - Use int32 for the index variables.
* Decided that I like remove-source-files better than remove-sender-files.Wayne Davison2006-06-301-3/+3
|
* Handle the --remove-sender-files option by sending MSG_SUCCESS forWayne Davison2006-06-301-0/+12
| | | | any file that is being hard-linked.
* Use the renamed stdout_format_has_i variable.Wayne Davison2006-05-291-3/+3
|
* Updated the FSF's address to an even newer one.Wayne Davison2006-04-251-3/+3
|
* - Updated the address for the FSF in the opening comment.Wayne Davison2006-04-251-18/+21
| | | | | | | - Standardized the format of the opening comment, including adding a brief description of what's in the file for those that lacked it. - Added some missing copyright lines. - Some minor whitespace tweaks (in a few of the files).
* Got rid of unused externs.Wayne Davison2006-02-241-1/+0
|
* Call f_name() with revised args (which also replaces f_name_to()).Wayne Davison2006-01-141-5/+7
|
* Got rid of calls to (the soon to vanish) safe_fname() function.Wayne Davison2006-01-131-9/+5
|
* When compare-dest/link-dest/copy-dest are in effect, we now checkWayne Davison2005-12-151-1/+28
| | | | | | if the file we're about to hard-link to the leader is present in one of the dest dirs -- if it is, we adjust the text we output accordingly.
* There is no longer a need to check file->link_u.links at the startWayne Davison2005-07-311-2/+0
| | | | of hard_link_check() (because the caller has already checked it).
* - Never output the '"FOO" is a hard link' message when -i (%i)Wayne Davison2005-06-091-1/+2
| | | | | | output is enabled. - Go back to outputting '"FOO" is a hard link' message when -i (%i) is not enabled and verbose > 1.
* - Added a new function, maybe_hard_link(), which now holds the codeWayne Davison2005-04-231-32/+69
| | | | | | | | | | | | | | | | | (moved from hard_link_cluster()) that checks the inode/dev of an existing file and either does nothing (when properly linked), or removes the existing file before calling hard_link_one(). - Changed hard_link_check() so that it checks if the master item is marked with FINISHED_LINK (in its hlindex int), and if so, it finishes the current file by calling maybe_hard_link() (and marking it as finished too). Otherwise it marks the item as skipped by setting hlindex to SKIPPED_LINK. - Fixed the outputting of an error in hard_link_one() so that the message is always output when the caller did not request "terse" processing. - Changed hard_link_cluster() so that it marks the master item with FINISHED_LINK and then links only the skipped items (marking them with FINISHED_LINK too).
* - Fixed a potential crash/infinite-loop bug if -H was usedWayne Davison2005-04-151-22/+19
| | | | | | | when sending a single file. - Made a couple variable improvements in link_idev_data(). - Got rid of the non-NULL check of hlink_list in init_hard_links() because is enough to just check file->link_u.links these days.
* When itemizing, we now set ITEM_LOCAL_CHANGE and ITEM_XNAME_FOLLOWS.Wayne Davison2005-03-091-3/+5
|
* - Changed hlink_list[] to store file-list indexes instead ofWayne Davison2005-03-051-73/+90
| | | | | | | | | | pointers. - Made hard_link_one() non-static so that the generator can call it. Improved it to do itemized output. - Replaced do_hard_links() with hard_link_cluster(), which changes the hard-linking from a post-transfer loop into a per-cluster operation that occurs incrementally as the transfer updates (or finds unchanged) one item in the cluster.
* Added 2 args to do_hard_links() so that it can call maybe_send_keepalive().Wayne Davison2005-02-271-1/+3
|
* John E. Malmberg convinced me to standardize on #ifs for definedWayne Davison2005-02-141-5/+5
| | | | values instead of non-zero.
* Improved the call to f_name_cmp().Wayne Davison2005-02-131-1/+1
|
* Fixed a typo.Wayne Davison2005-02-071-1/+1
|
* Added missing calls to safe_fname() and full_fname().Wayne Davison2005-02-071-3/+3
|
* In hlink_compare(), call f_name_cmp() directly instead of usingWayne Davison2005-02-031-1/+1
| | | | file_compare().
* Made hard_link_check() compile when SUPPORT_HARD_LINKS isn't enabled.Wayne Davison2004-07-121-0/+2
|
* Call link_stat() with its new arg (for --keep-dirlinks support).Wayne Davison2004-06-111-2/+2
|
* Changed rprintf() calls that included strerror() to use rsyserr().Wayne Davison2004-05-151-6/+5
|
* Fixed a crash bug when hlink_list is NULL and a link_u.linksWayne Davison2004-03-261-1/+1
| | | | pointer in one of the file_struct nodes is not.
* If --backup was specified, the links we remove are backed up.Wayne Davison2004-02-111-3/+7
|
* Make idev, hlink and file_struct + strings use allocationJ.W. Schultz2004-02-101-2/+21
| | | | pools.
* correct sizeof usage.J.W. Schultz2004-02-031-9/+9
|
* Don't free link_u.idev.Wayne Davison2004-02-021-1/+0
|
* Free the hlink data again.Wayne Davison2004-02-021-0/+1
|
* Don't free the hlink data (it is not separately allocated anymore).Wayne Davison2004-02-021-1/+0
|
* Fixed a comment.Wayne Davison2004-01-271-1/+1
|
* We now link the hard-linked flist entries into a circular list, markWayne Davison2004-01-251-9/+26
| | | | | | the last item with FLAG_HLINK_EOL, and save off an index for our master entry in the hlink_list[] array. Added the hard_link_check() function.
* Use the new f_name_to() calling syntax.Wayne Davison2004-01-221-4/+3
|
* Updated to perform a much more efficient hlink algorithm that doesn'tWayne Davison2004-01-121-84/+74
| | | | require any binary searching of hlink data.
* Updated a questioning comment.Wayne Davison2004-01-111-2/+3
|
* Use the new dev+inode union in the flist_struct.Wayne Davison2004-01-111-10/+10
|
* Optimized the sending of dev+inode data for hard-linking supportWayne Davison2004-01-081-2/+2
| | | | (but only when speaking protocol 28).