summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/compat.c
diff options
context:
space:
mode:
authorCsaba Henk <csaba@gluster.com>2010-05-12 19:10:47 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-05-13 12:12:08 -0700
commit2a0398dee8521704b90d3f1776a5e380bf8ac5b3 (patch)
tree394a62736967be4cfec9314e8fdc9cce54ebcd25 /libglusterfs/src/compat.c
parent9bdda4ce0aaebb3f8109152f056d9b35229fb708 (diff)
added features/mac-compat
Signed-off-by: Csaba Henk <csaba@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 800 (Problem on OSX with NFS and CIFS exports) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=800
Diffstat (limited to 'libglusterfs/src/compat.c')
-rw-r--r--libglusterfs/src/compat.c86
1 files changed, 0 insertions, 86 deletions
diff --git a/libglusterfs/src/compat.c b/libglusterfs/src/compat.c
index 85af45f..891b156 100644
--- a/libglusterfs/src/compat.c
+++ b/libglusterfs/src/compat.c
@@ -36,92 +36,6 @@
#include "compat.h"
#include "common-utils.h"
-#ifdef GF_DARWIN_HOST_OS
-
-#define GF_FINDER_INFO_XATTR "com.apple.FinderInfo"
-#define GF_RESOURCE_FORK_XATTR "com.apple.ResourceFork"
-#define GF_FINDER_INFO_SIZE 32
-
-static const char gf_finder_info_content[GF_FINDER_INFO_SIZE] = {
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
-};
-
-
-int32_t
-gf_darwin_compat_listxattr (int len, dict_t *dict, int size)
-{
- data_t *data = NULL;
- if (len == -1)
- len = 0;
-
- data = dict_get (dict, GF_FINDER_INFO_XATTR);
- if (!data) {
- dict_set (dict, GF_FINDER_INFO_XATTR,
- bin_to_data ((void *)gf_finder_info_content,
- GF_FINDER_INFO_SIZE));
- len += strlen (GF_FINDER_INFO_XATTR);
- }
-
- data = dict_get (dict, GF_RESOURCE_FORK_XATTR);
- if (!data) {
- dict_set (dict, GF_RESOURCE_FORK_XATTR, str_to_data (""));
- len += strlen (GF_RESOURCE_FORK_XATTR);
- }
-
- return len;
-}
-
-int32_t
-gf_darwin_compat_getxattr (const char *key, dict_t *dict)
-{
- data_t *data = NULL;
-
- if (strcmp(key, GF_FINDER_INFO_XATTR) == 0) {
- data = dict_get (dict, GF_FINDER_INFO_XATTR);
- if (!data) {
- dict_set (dict, GF_FINDER_INFO_XATTR,
- bin_to_data ((void *)gf_finder_info_content,
- GF_FINDER_INFO_SIZE));
- return GF_FINDER_INFO_SIZE;
- }
- return 0;
- }
-
- if (strcmp(key, GF_RESOURCE_FORK_XATTR) == 0) {
- data = dict_get (dict, GF_RESOURCE_FORK_XATTR);
- if (!data) {
- /* Always null */
- dict_set (dict, GF_RESOURCE_FORK_XATTR,
- str_to_data (""));
- return 0;
- }
- return 0;
- }
- return -1;
-}
-
-
-int32_t
-gf_darwin_compat_setxattr (dict_t *dict)
-{
- data_t *data = NULL;
-
- data = dict_get (dict, GF_FINDER_INFO_XATTR);
- if (data)
- return 0;
- data = dict_get (dict, GF_RESOURCE_FORK_XATTR);
- if (data)
- return 0;
-
- return -1;
-}
-
-#endif /* DARWIN */
-
-
#ifdef GF_SOLARIS_HOST_OS
int