summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorMartin Pool <mbp@samba.org>2002-04-08 04:48:51 +0000
committerMartin Pool <mbp@samba.org>2002-04-08 04:48:51 +0000
commitb4235b3165fda2c09072ed830de9a13db5e81b41 (patch)
treec303a2dcccc454c5b53bc82bb585761186d7141c /util.c
parentd25c0e42c72f2399b44b0c666fc823daa9874521 (diff)
downloadrsync-b4235b3165fda2c09072ed830de9a13db5e81b41.tar.gz
Doc.
Diffstat (limited to 'util.c')
-rw-r--r--util.c35
1 files changed, 18 insertions, 17 deletions
diff --git a/util.c b/util.c
index 00670db4..0f5a410a 100644
--- a/util.c
+++ b/util.c
@@ -301,16 +301,15 @@ int copy_file(char *source, char *dest, mode_t mode)
#define MAX_RENAMES 1000
/**
- *
- Robust unlink: some OS'es (HPUX) refuse to unlink busy files, so
- rename to <path>/.rsyncNNN instead.
-
- Note that successive rsync runs will shuffle the filenames around a
- bit as long as the file is still busy; this is because this function
- does not know if the unlink call is due to a new file coming in, or
- --delete trying to remove old .rsyncNNN files, hence it renames it
- each time.
-*/
+ * Robust unlink: some OS'es (HPUX) refuse to unlink busy files, so
+ * rename to <path>/.rsyncNNN instead.
+ *
+ * Note that successive rsync runs will shuffle the filenames around a
+ * bit as long as the file is still busy; this is because this function
+ * does not know if the unlink call is due to a new file coming in, or
+ * --delete trying to remove old .rsyncNNN files, hence it renames it
+ * each time.
+ **/
int robust_unlink(char *fname)
{
#ifndef ETXTBSY
@@ -590,17 +589,19 @@ void clean_fname(char *name)
/**
* Make path appear as if a chroot had occurred:
*
- * 1. remove leading "/" (or replace with "." if at end)
- * 2. remove leading ".." components (except those allowed by "reldir")
- * 3. delete any other "<dir>/.." (recursively)
+ * @li 1. remove leading "/" (or replace with "." if at end)
+ *
+ * @li 2. remove leading ".." components (except those allowed by @p reldir)
+ *
+ * @li 3. delete any other "<dir>/.." (recursively)
*
* Can only shrink paths, so sanitizes in place.
*
* While we're at it, remove double slashes and "." components like
- * clean_fname does(), but DON'T remove a trailing slash because that
+ * clean_fname() does, but DON'T remove a trailing slash because that
* is sometimes significant on command line arguments.
*
- * If "reldir" is non-null, it is a sanitized directory that the path will be
+ * If @p reldir is non-null, it is a sanitized directory that the path will be
* relative to, so allow as many ".." at the beginning of the path as
* there are components in reldir. This is used for symbolic link targets.
* If reldir is non-null and the path began with "/", to be completely like
@@ -828,8 +829,8 @@ int unsafe_symlink(char *dest, char *src)
/**
- Return the date and time as a string
-*/
+ * Return the date and time as a string
+ **/
char *timestring(time_t t)
{
static char TimeBuf[200];