[Pkg-owncloud-commits] [owncloud-client] 80/333: csync: Remove unix_extensions
Sandro Knauß
hefee-guest at moszumanska.debian.org
Thu Apr 17 23:16:37 UTC 2014
This is an automated email from the git hooks/post-receive script.
hefee-guest pushed a commit to branch master
in repository owncloud-client.
commit a2e8bfd96253982bb8894eb4c998b8156b38b814
Author: Markus Goetz <markus at woboq.com>
Date: Thu Feb 27 13:22:19 2014 +0100
csync: Remove unix_extensions
---
csync/src/csync.c | 15 ---------------
csync/src/csync_exclude.c | 2 --
csync/src/csync_owncloud.c | 6 +-----
csync/src/csync_util.c | 34 ----------------------------------
csync/src/csync_util.h | 2 --
csync/src/vio/csync_vio.c | 3 ---
6 files changed, 1 insertion(+), 61 deletions(-)
diff --git a/csync/src/csync.c b/csync/src/csync.c
index 6ac8c27..a0474c9 100644
--- a/csync/src/csync.c
+++ b/csync/src/csync.c
@@ -129,7 +129,6 @@ int csync_create(CSYNC **csync, const char *local, const char *remote) {
ctx->status_code = CSYNC_STATUS_OK;
ctx->options.max_depth = MAX_DEPTH;
ctx->options.max_time_difference = MAX_TIME_DIFFERENCE;
- ctx->options.unix_extensions = 0;
ctx->options.with_conflict_copys=false;
ctx->options.local_only_mode = false;
@@ -224,20 +223,6 @@ retry_vio_init:
ctx->remote.type = LOCAL_REPLICA;
}
- if(!ctx->options.local_only_mode) {
- if(ctx->module.capabilities.unix_extensions == -1) { /* detect */
- if (csync_unix_extensions(ctx) < 0) {
- CSYNC_LOG(CSYNC_LOG_PRIORITY_FATAL, "Could not detect filesystem type.");
- ctx->status_code = CSYNC_STATUS_FILESYSTEM_UNKNOWN;
- rc = -1;
- goto out;
- }
- } else {
- /* The module specifies the value for the unix_extensions. */
- ctx->options.unix_extensions = ctx->module.capabilities.unix_extensions;
- }
- }
-
if (ctx->options.timeout)
csync_vio_set_property(ctx, "timeout", &ctx->options.timeout);
diff --git a/csync/src/csync_exclude.c b/csync/src/csync_exclude.c
index 96d8fa1..42225a0 100644
--- a/csync/src/csync_exclude.c
+++ b/csync/src/csync_exclude.c
@@ -148,7 +148,6 @@ CSYNC_EXCLUDE_TYPE csync_excluded(CSYNC *ctx, const char *path, int filetype) {
CSYNC_EXCLUDE_TYPE match = CSYNC_NOT_EXCLUDED;
CSYNC_EXCLUDE_TYPE type = CSYNC_NOT_EXCLUDED;
- if (! ctx->options.unix_extensions) {
for (p = path; *p; p++) {
switch (*p) {
case '\\':
@@ -164,7 +163,6 @@ CSYNC_EXCLUDE_TYPE csync_excluded(CSYNC *ctx, const char *path, int filetype) {
break;
}
}
- }
/* split up the path */
dname = c_dirname(path);
diff --git a/csync/src/csync_owncloud.c b/csync/src/csync_owncloud.c
index 33a49a6..1eceaeb 100644
--- a/csync/src/csync_owncloud.c
+++ b/csync/src/csync_owncloud.c
@@ -894,16 +894,12 @@ static int owncloud_stat(const char *uri, csync_vio_file_stat_t *buf) {
/* capabilities are currently:
* bool atomar_copy_support - oC provides atomar copy
* bool do_post_copy_stat - oC does not want the post copy check
- * int unix_extensions - oC supports unix extensions.
* bool propagate_on_fd - oC supports the send_file method.
*/
-static csync_vio_capabilities_t _owncloud_capabilities = { true, false, 0, true, false, false };
+static csync_vio_capabilities_t _owncloud_capabilities = { true, false, true, false, false };
static csync_vio_capabilities_t *owncloud_capabilities(void)
{
-#ifdef _WIN32
- _owncloud_capabilities.unix_extensions = 0;
-#endif
return &_owncloud_capabilities;
}
diff --git a/csync/src/csync_util.c b/csync/src/csync_util.c
index df9b46d..0daad23 100644
--- a/csync/src/csync_util.c
+++ b/csync/src/csync_util.c
@@ -106,40 +106,6 @@ void csync_memstat_check(void) {
m.size * 4, m.resident * 4, m.shared * 4);
}
-int csync_unix_extensions(CSYNC *ctx) {
- int rc = -1;
- char *uri = NULL;
- csync_vio_handle_t *fp = NULL;
-
- ctx->options.unix_extensions = 0;
-
- rc = asprintf(&uri, "%s/csync_unix_extension*test.ctmp", ctx->remote.uri);
- if (rc < 0) {
- goto out;
- }
-
- ctx->replica = ctx->remote.type;
- fp = csync_vio_creat(ctx, uri, 0644);
- if (fp == NULL) {
- rc = 0;
- CSYNC_LOG(CSYNC_LOG_PRIORITY_INFO,
- "Disabled unix filesystem synchronization");
- goto out;
- }
- csync_vio_close(ctx, fp);
-
- ctx->options.unix_extensions = 1;
- CSYNC_LOG(CSYNC_LOG_PRIORITY_INFO, "Enabled unix filesystem synchronization");
-
- rc = 1;
-
-out:
- csync_vio_unlink(ctx, uri);
- SAFE_FREE(uri);
-
- return rc;
-}
-
void csync_win32_set_file_hidden( const char *file, bool h ) {
#ifdef _WIN32
const mbchar_t *fileName;
diff --git a/csync/src/csync_util.h b/csync/src/csync_util.h
index 10f5727..886408e 100644
--- a/csync/src/csync_util.h
+++ b/csync/src/csync_util.h
@@ -30,8 +30,6 @@ const char *csync_instruction_str(enum csync_instructions_e instr);
void csync_memstat_check(void);
-int csync_unix_extensions(CSYNC *ctx);
-
void csync_win32_set_file_hidden( const char *file, bool hidden );
/* Convert a csync_file_stat_t to csync_vio_file_stat_t */
diff --git a/csync/src/vio/csync_vio.c b/csync/src/vio/csync_vio.c
index 0318f0d..c606a62 100644
--- a/csync/src/vio/csync_vio.c
+++ b/csync/src/vio/csync_vio.c
@@ -73,7 +73,6 @@ int csync_vio_init(CSYNC *ctx, const char *module, const char *args) {
/* Useful defaults to the module capabilities */
ctx->module.capabilities.atomar_copy_support = false;
ctx->module.capabilities.do_post_copy_stat = true;
- ctx->module.capabilities.unix_extensions = -1; /* detect automatically */
ctx->module.capabilities.use_send_file_to_propagate = false; /* do use read/write by default */
/* Load the module capabilities from the module if it implements the it. */
@@ -85,8 +84,6 @@ int csync_vio_init(CSYNC *ctx, const char *module, const char *args) {
ctx->module.capabilities.atomar_copy_support ? "yes": "no");
CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "capabilities: post copy stat: %s",
ctx->module.capabilities.do_post_copy_stat ? "yes": "no");
- CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "capabilities: unix extensions: %d",
- ctx->module.capabilities.unix_extensions );
CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "capabilities: use send_file: %s",
ctx->module.capabilities.use_send_file_to_propagate ? "yes" : "no" );
CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "capabilities: get support: %s",
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git
More information about the Pkg-owncloud-commits
mailing list