develop.uap-core.de/git
/
mizunara.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
minimal copy
[mizunara.git]
/
mizucp
/
main.h
diff --git
a/mizucp/main.h
b/mizucp/main.h
index
872b06f
..
1c5f730
100644
(file)
--- a/
mizucp/main.h
+++ b/
mizucp/main.h
@@
-24,6
+24,8
@@
#define MAIN_H
#include <stdlib.h>
#define MAIN_H
#include <stdlib.h>
+#include <unistd.h>
+#include <sys/stat.h>
#include <ucx/string.h>
#include <ucx/string.h>
@@
-41,6
+43,7
@@
extern "C" {
#define CLIENT_MSG_BUFSIZE 512
#define MAX_COPY_THREADS 32
#define CLIENT_MSG_BUFSIZE 512
#define MAX_COPY_THREADS 32
+#define MZ_COPY_BUFSIZE 4 * 1024 * 1024
typedef char CPBool;
typedef char CPBool;
@@
-55,6
+58,7
@@
typedef struct {
CPBool url;
CPBool pause;
CPBool printsocket;
CPBool url;
CPBool pause;
CPBool printsocket;
+ struct stat root_stat;
} CPSettings;
struct MZLock {
} CPSettings;
struct MZLock {
@@
-79,6
+83,11
@@
struct SrcFile {
CPBool finished;
/*
CPBool finished;
/*
+ * file mode
+ */
+ mode_t mode;
+
+ /*
* processing this file depends on another file (directory)
*/
SrcFile *depends_on;
* processing this file depends on another file (directory)
*/
SrcFile *depends_on;
@@
-107,6
+116,8
@@
int enqueue_file(SrcFile *file);
int mzcp_start_copy_threads(CPSettings *settings);
void* copy_run(void *data);
int mzcp_start_copy_threads(CPSettings *settings);
void* copy_run(void *data);
+int mz_copy_dir(CPSettings *settings, SrcFile *file, const char *from, const char *to);
+int mz_copy_file(CPSettings *settings, SrcFile *file, const char *from, const char *to, char *buffer, size_t bufsize);
#ifdef __cplusplus
#ifdef __cplusplus