aboutsummaryrefslogtreecommitdiff
path: root/src/diskio.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2009-02-22 13:37:20 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2009-02-22 13:37:20 +0200
commitd1ee123b443c2de4fb6e1622068611ab631a1f27 (patch)
tree86f73699689f12ff9d0882723205c595130869a3 /src/diskio.c
parent5dd37baedfb74ad33fd7b785fe316e40e3b93551 (diff)
downloadwydawca-d1ee123b443c2de4fb6e1622068611ab631a1f27.tar.gz
wydawca-d1ee123b443c2de4fb6e1622068611ab631a1f27.tar.bz2
Rename directory_pair to spool
Diffstat (limited to 'src/diskio.c')
-rw-r--r--src/diskio.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/src/diskio.c b/src/diskio.c
index 0548972..9df7a1a 100644
--- a/src/diskio.c
+++ b/src/diskio.c
@@ -441,12 +441,12 @@ do_archive_file (const char *dst_file, const char *dst_dir, const char *file,
Do nothing if dry_run_mode is set. */
int
-dir_move_file (struct file_triplet *trp, struct directory_pair *dpair,
+dir_move_file (struct file_triplet *trp, struct spool *spool,
enum file_type file_id, const char *reldir)
{
char *dst_file;
int rc = 0;
- char *dst_dir = create_directory (dpair->dest_dir, reldir,
+ char *dst_dir = create_directory (spool->dest_dir, reldir,
TRIPLET_UID (trp), TRIPLET_GID (trp));
if (!dst_dir)
@@ -459,7 +459,7 @@ dir_move_file (struct file_triplet *trp, struct directory_pair *dpair,
if (access (dst_file, F_OK) == 0)
rc = do_archive_file (dst_file, dst_dir, trp->file[file_id].name,
- &dpair->archive,
+ &spool->archive,
TRIPLET_UID (trp), TRIPLET_GID (trp), reldir);
if (!dry_run_mode && rc == 0)
@@ -478,23 +478,23 @@ dir_move_file (struct file_triplet *trp, struct directory_pair *dpair,
Do nothing if dry_run_mode is set.
*/
int
-archive_single_file (struct file_triplet *trp, struct directory_pair *dpair,
+archive_single_file (struct file_triplet *trp, struct spool *spool,
const char *file_name, const char *reldir,
int noentok)
{
char *dst_file;
int rc = 0;
- char *dst_dir = create_directory (dpair->dest_dir, reldir,
+ char *dst_dir = create_directory (spool->dest_dir, reldir,
TRIPLET_UID (trp), TRIPLET_GID (trp));
if (!dst_dir)
return 1;
dst_file = safe_file_name (concat_dir (dst_dir, file_name, NULL));
- if (!sub_dir_p (dst_file, dpair->dest_dir))
+ if (!sub_dir_p (dst_file, spool->dest_dir))
{
logmsg (LOG_ERR, "file to be archived `%s' does not lie under `%s'",
- dst_file, dpair->dest_dir);
+ dst_file, spool->dest_dir);
free (dst_file);
free (dst_dir);
return 1;
@@ -504,7 +504,7 @@ archive_single_file (struct file_triplet *trp, struct directory_pair *dpair,
{
if (debug_level)
logmsg (LOG_DEBUG, "Archiving file `%s'", dst_file);
- rc = do_archive_file (dst_file, dst_dir, file_name, &dpair->archive,
+ rc = do_archive_file (dst_file, dst_dir, file_name, &spool->archive,
TRIPLET_UID (trp), TRIPLET_GID (trp), reldir);
if (rc == 0)
UPDATE_STATS (STAT_ARCHIVES);
@@ -548,16 +548,16 @@ make_signame (const char *file_name)
Do nothing if dry_run_mode is set.
*/
int
-dir_archive_file (struct file_triplet *trp, struct directory_pair *dpair,
+dir_archive_file (struct file_triplet *trp, struct spool *spool,
const char *reldir, const char *file_name)
{
int rc;
char *signame;
- rc = archive_single_file (trp, dpair, file_name, reldir, 0);
+ rc = archive_single_file (trp, spool, file_name, reldir, 0);
if (rc == 0 && archive_signatures && (signame = make_signame (file_name)))
{
- rc = archive_single_file (trp, dpair, signame, reldir, 1);
+ rc = archive_single_file (trp, spool, signame, reldir, 1);
free (signame);
}
return rc;
@@ -568,13 +568,13 @@ dir_archive_file (struct file_triplet *trp, struct directory_pair *dpair,
Do nothing if dry_run_mode is set. */
int
-dir_symlink_file (struct file_triplet *trp, struct directory_pair *dpair,
+dir_symlink_file (struct file_triplet *trp, struct spool *spool,
const char *reldir,
const char *wanted_src, const char *wanted_dst)
{
int rc = 0;
struct saved_cwd cwd;
- char *dst_dir = create_directory (dpair->dest_dir, reldir,
+ char *dst_dir = create_directory (spool->dest_dir, reldir,
TRIPLET_UID (trp), TRIPLET_GID (trp));
char *src, *dst;
@@ -592,7 +592,7 @@ dir_symlink_file (struct file_triplet *trp, struct directory_pair *dpair,
if (!src || src[0] == '/')
{
logmsg (LOG_ERR, "symlink source `%s' does not lie under `%s'",
- wanted_src, dpair->dest_dir);
+ wanted_src, spool->dest_dir);
free (src);
return 1;
}
@@ -601,7 +601,7 @@ dir_symlink_file (struct file_triplet *trp, struct directory_pair *dpair,
if (!dst || dst[0] == '/')
{
logmsg (LOG_ERR, "symlink destination `%s' does not lie under `%s'",
- wanted_dst, dpair->dest_dir);
+ wanted_dst, spool->dest_dir);
free (src);
free (dst);
return 1;
@@ -619,7 +619,7 @@ dir_symlink_file (struct file_triplet *trp, struct directory_pair *dpair,
char *dir;
*p = 0;
- dir = create_directory (dpair->dest_dir, dst,
+ dir = create_directory (spool->dest_dir, dst,
TRIPLET_UID (trp), TRIPLET_GID (trp));
if (!dir)
rc = 1;
@@ -728,24 +728,24 @@ do_rmsymlink_file (const char *dst_file, int noentok)
Do nothing if dry_run_mode is set. */
int
-dir_rmsymlink_file (struct file_triplet *trp, struct directory_pair *dpair,
+dir_rmsymlink_file (struct file_triplet *trp, struct spool *spool,
const char *reldir, const char *file_name)
{
char *dst_file;
int rc = 0;
char *signame;
- char *dst_dir = create_directory (dpair->dest_dir, reldir,
+ char *dst_dir = create_directory (spool->dest_dir, reldir,
TRIPLET_UID (trp), TRIPLET_GID (trp));
if (!dst_dir)
return 1;
dst_file = safe_file_name (concat_dir (dst_dir, file_name, NULL));
- if (!sub_dir_p (dst_file, dpair->dest_dir))
+ if (!sub_dir_p (dst_file, spool->dest_dir))
{
logmsg (LOG_ERR, "refusing to remove a symlink `%s' that is not "
"located under `%s'",
- dst_file, dpair->dest_dir);
+ dst_file, spool->dest_dir);
free (dst_file);
free (dst_dir);
return 1;

Return to:

Send suggestions and report system problems to the System administrator.