summaryrefslogtreecommitdiff
path: root/src/file.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/file.h')
-rw-r--r--src/file.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/file.h b/src/file.h
index 1a4d6a3..3ee8820 100644
--- a/src/file.h
+++ b/src/file.h
@@ -12,12 +12,12 @@
struct file {
struct list_head list; /* mscp->file_list */
- char path[PATH_MAX]; /* copy source path */
- bool remote; /* source is remote */
- size_t size; /* size of this file */
+ char src_path[PATH_MAX]; /* copy source path */
+ bool src_is_remote; /* source is remote */
+ size_t size; /* size of this file */
- char dst_path[PATH_MAX]; /* copy destination path */
- bool dst_remote; /* destination is remote */
+ char dst_path[PATH_MAX]; /* copy destination path */
+ bool dst_is_remote; /* destination is remote */
int state; /* destination file state */
lock lock; /* mutex to protect state */
@@ -27,6 +27,8 @@ struct file {
#define FILE_STATE_OPENED 1
#define FILE_STATE_DONE 2
+#define strloc(is_remote) is_remote ? "(remote)" : "(local)"
+
/* Allocating chunk increments refcnt of the associating file.
* Multiple threads copying files follows:
*