]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/filed/xattr.h
Backport from Bacula Enterprise
[bacula/bacula] / bacula / src / filed / xattr.h
index 131e6c6c5f3f561b3aa630829d4a83c29ae46b2f..b2bbe23b3f1e6d29f6a220e16038de4d6d1b670e 100644 (file)
@@ -1,21 +1,25 @@
 /*
-   Bacula® - The Network Backup Solution
+   Bacula(R) - The Network Backup Solution
 
+   Copyright (C) 2000-2015 Kern Sibbald
    Copyright (C) 2004-2014 Free Software Foundation Europe e.V.
 
-   The main author of Bacula is Kern Sibbald, with contributions from many
-   others, a complete list can be found in the file AUTHORS.
+   The original author of Bacula is Kern Sibbald, with contributions
+   from many others, a complete list can be found in the file AUTHORS.
 
    You may use this file and others of this release according to the
    license defined in the LICENSE file, which includes the Affero General
    Public License, v3.0 ("AGPLv3") and some additional permissions and
    terms pursuant to its AGPLv3 Section 7.
 
-   Bacula® is a registered trademark of Kern Sibbald.
+   This notice must be preserved when any source code is 
+   conveyed and/or propagated.
+
+   Bacula(R) is a registered trademark of Kern Sibbald.
 */
 
-#ifndef __XATTR_H
-#define __XATTR_H
+#ifndef __BXATTR_H_
+#define __BXATTR_H_
 
 #if defined(HAVE_LINUX_OS)
 #define BXATTR_ENOTSUP EOPNOTSUPP
@@ -53,38 +57,21 @@ struct xattr_link_cache_entry_t {
 #define BXATTR_FLAG_SAVE_NATIVE    0x01
 #define BXATTR_FLAG_RESTORE_NATIVE 0x02
 
-struct xattr_build_data_t {
-   uint32_t nr_errors;
-   uint32_t nr_saved;
-   POOLMEM *content;
-   uint32_t content_length;
-   alist *link_cache;
-};
-
-struct xattr_parse_data_t {
-   uint32_t nr_errors;
-};
-
 /*
  * Internal tracking data.
  */
-struct xattr_data_t {
+struct xattr_ctx_t {
    uint32_t flags;              /* See BXATTR_FLAG_* */
    uint32_t current_dev;
-   union {
-      struct xattr_build_data_t *build;
-      struct xattr_parse_data_t *parse;
-   } u;
+   uint32_t nr_errors;
+   uint32_t nr_saved;
+   POOLMEM *content;
+   uint32_t content_length;
+   alist *link_cache;
 };
 
-/*
- * Maximum size of the XATTR stream this prevents us from blowing up the filed.
- */
-#define MAX_XATTR_STREAM  (1 * 1024 * 1024) /* 1 Mb */
+#define MAX_XATTR_LENGTH  (1 * 1024 * 1024) /* 1 Mb */
 
-/*
- * Upperlimit on a xattr internal buffer
- */
-#define XATTR_BUFSIZ   1024
+#define XATTR_BUFSIZ    1024
 
-#endif
+#endif /* __BXATTR_H_ */