]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfsprogs update - Debian installer support, sync user/kernel stuff.
authorNathan Scott <nathans@sgi.com>
Tue, 20 Jan 2004 00:41:43 +0000 (00:41 +0000)
committerNathan Scott <nathans@sgi.com>
Tue, 20 Jan 2004 00:41:43 +0000 (00:41 +0000)
23 files changed:
VERSION
debian/Makefile
debian/changelog
debian/control
debian/rules
doc/CHANGES
include/Makefile
include/buildmacros
include/libxfs.h
include/xfs_acl.h [deleted file]
include/xfs_ag.h
include/xfs_attr_leaf.h
include/xfs_cap.h [deleted file]
include/xfs_mac.h [deleted file]
include/xfs_types.h
io/pread.c
io/pwrite.c
libxfs/xfs.h
libxfs/xfs_attr_leaf.c
libxfs/xfs_dir2_node.c
mkfs/xfs_mkfs.h
repair/attr_repair.c
repair/attr_repair.h

diff --git a/VERSION b/VERSION
index 224eedb86a4ad2a5454a3f680cffb1fd42519e40..1c2cf1f8791904e0eeb23eb3d56e894a4c9b5247 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -3,5 +3,5 @@
 #
 PKG_MAJOR=2
 PKG_MINOR=6
-PKG_REVISION=2
+PKG_REVISION=3
 PKG_BUILD=0
index 4cfaa7bf63ed57958d200836d7a7ea66257dbae5..b15a7615a982d9c7a20ece9c4c4971009cb05149 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2000-2001 Silicon Graphics, Inc.  All Rights Reserved.
+# Copyright (c) 2000-2004 Silicon Graphics, Inc.  All Rights Reserved.
 # 
 # This program is free software; you can redistribute it and/or modify it
 # under the terms of version 2 of the GNU General Public License as
@@ -35,10 +35,7 @@ include $(TOPDIR)/include/builddefs
 
 LSRCFILES = changelog control copyright rules
 DEV_DOC_DIR = $(PKG_DOC_DIR)/../xfslibs-dev
-BOOT_DOC_DIR = $(PKG_DOC_DIR)/../xfsprogs-bf
-BOOT_MAN_DIR = $(PKG_MAN_DIR)/man8
-BOOT_MKFS_BIN = $(TOPDIR)/mkfs/mkfs.xfs-xfsprogs-bf
-BOOT_MKFS_MAN = $(TOPDIR)/man/man8/mkfs.xfs.8
+BOOT_MKFS_BIN = $(TOPDIR)/mkfs/mkfs.xfs-xfsprogs-udeb
 
 default:
 
@@ -58,14 +55,8 @@ ifeq ($(PKG_DISTRIBUTION), debian)
        $(INSTALL) -m 644 changelog $(DEV_DOC_DIR)/changelog.Debian
 endif
 
-install-boot: default
+install-d-i: default
 ifeq ($(PKG_DISTRIBUTION), debian)
-       $(INSTALL) -m 755 -d $(PKG_DOC_DIR)
        $(INSTALL) -m 755 -d $(PKG_SBIN_DIR)
-       $(INSTALL) -m 755 -d $(BOOT_DOC_DIR)
-       $(INSTALL) -m 755 -d $(BOOT_MAN_DIR)
-       $(INSTALL) -m 644 copyright $(BOOT_DOC_DIR)
-       $(INSTALL) -m 644 changelog $(BOOT_DOC_DIR)/changelog.Debian
        $(INSTALL) -m 755 $(BOOT_MKFS_BIN) $(PKG_SBIN_DIR)/mkfs.xfs
-       $(INSTALL) -m 644 $(BOOT_MKFS_MAN) $(BOOT_MAN_DIR)/mkfs.xfs.8
 endif
index 6b2020432f7ae04ec41a06f86b884646b7665868..7c8bd4927c482ae3f614e9e6754c4845333bc42b 100644 (file)
@@ -1,14 +1,15 @@
-xfsprogs (2.6.2-1) unstable; urgency=low
+xfsprogs (2.6.3-1) unstable; urgency=low
 
   * New upstream release.
+  * Add support for debian-installer.  (closes: #225444)
+    Author: Steve Langasek.
+  * Use debhelper instead of debmake, for proper udeb building.
+    Author: Steve Langasek.
+  * Drop boot-floppies support.  (closes: #112715)
+    Author: Steve Langasek.
+  * Add support for the security attribute namespace.
 
- -- Nathan Scott <nathans@debian.org>  Wed, 17 Dec 2003 21:16:53 +1100
-
-xfsprogs (2.6.1-1) unstable; urgency=low
-
-  * New upstream release.
-
- -- Nathan Scott <nathans@debian.org>  Thu, 27 Nov 2003 13:47:17 +1100
+ -- Nathan Scott <nathans@debian.org>  Mon, 19 Jan 2004 10:08:59 +1100
 
 xfsprogs (2.6.0-1) unstable; urgency=low
 
@@ -38,7 +39,7 @@ xfsprogs (2.5.5-1) unstable; urgency=low
 xfsprogs (2.5.4-1) unstable; urgency=low
 
   * New upstream release, includes xfs_copy command
-  * Fix shell quoting in xfs_bmap, from Kai S. Juse (closes: 202588)
+  * Fix shell quoting in xfs_bmap, from Kai S. Juse (closes: #202588)
 
  -- Nathan Scott <nathans@debian.org>  Wed, 23 Jul 2003 10:36:28 +1000
 
index a284fb89ef008f9f80afab47b47827fdf5f358ba..720fb0540dae9a56107bfe032ca5c442bf6cd6da 100644 (file)
@@ -2,7 +2,7 @@ Source: xfsprogs
 Section: admin
 Priority: optional
 Maintainer: Nathan Scott <nathans@debian.org>
-Build-Depends: uuid-dev, autoconf, debmake, gettext, libtool, libreadline4-dev
+Build-Depends: uuid-dev, autoconf, debhelper, gettext, libtool, libreadline4-dev
 Standards-Version: 3.5.9
 
 Package: xfsprogs
@@ -33,17 +33,15 @@ Architecture: any
 Description: XFS filesystem-specific static libraries and headers
  xfslibs-dev contains the libraries and header files needed to
  develop XFS filesystem-specific programs.
-Package: xfsprogs-bf
-Section: devel
-Priority: extra
-Depends: ${shlibs:Depends}
-Conflicts: e2fsprogs, xfsprogs
+
+Package: xfsprogs-udeb
+Section: debian-installer
+Priority: standard
 Architecture: any
-Description: A stripped-down versions of xfsprogs, for boot-floppies
- This package is an xfsprogs package built for a reduced size, so that
- it can help to save space on installation boot-floppies.
+Depends: ${shlibs:Depends}
+Description: A stripped-down version of xfsprogs, for debian-installer
+ This package is an xfsprogs package built for reduced size, so that it
+ can help to save space in debian-installer.
  .
  Don't attempt to install this package, it has no support for a couple of
- features you surely want.  Anyway it should refuse to install.
-
+ features you surely want.  Anyway, it should fail to install.
index b6e5eec598c57de068ee40126cdda7a18791ebb6..4bb9d59ea85f83f4c4375567ba402a0e947f31e6 100755 (executable)
@@ -2,22 +2,26 @@
 
 package = xfsprogs
 develop = xfslibs-dev
-bootpkg = xfsprogs-bf
+bootpkg = xfsprogs-udeb
+
+version = $(shell dpkg-parsechangelog | grep ^Version: | cut -d ' ' -f 2)
+target ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
+udebpkg = $(bootpkg)_$(version)_$(target).udeb
 
 dirtmp = debian/tmp
 dirdev = debian/$(develop)
-dirbfs = debian/$(bootpkg)
+dirdi  = debian/$(bootpkg)
 pkgtmp = DIST_ROOT=`pwd`/$(dirtmp); export DIST_ROOT;
 pkgdev = DIST_ROOT=`pwd`/$(dirdev); export DIST_ROOT;
-pkgbfs = DIST_ROOT=`pwd`/$(dirbfs); export DIST_ROOT;
+pkgdi  = DIST_ROOT=`pwd`/$(dirdi); export DIST_ROOT;
 stdenv = @GZIP=-q; export GZIP;
 
 options = DEBUG=-DNDEBUG; DISTRIBUTION=debian; LOCAL_CONFIGURE_OPTIONS=--enable-readline=yes; export DEBUG DISTRIBUTION LOCAL_CONFIGURE_OPTIONS;
-bfsopts = $(options) OPTIMIZER=-Os; LOCAL_CONFIGURE_OPTIONS="--enable-shared-uuid=yes --enable-gettext=no"; export OPTIMIZER LOCAL_CONFIGURE_OPTIONS;
+diopts = $(options) OPTIMIZER=-Os; LOCAL_CONFIGURE_OPTIONS="--enable-shared-uuid=yes --enable-gettext=no"; export OPTIMIZER LOCAL_CONFIGURE_OPTIONS;
 checkdir = test -f debian/rules
 
 build: built
-built: bfbuild config
+built: dibuild config
        @echo "== dpkg-buildpackage: build" 1>&2
        $(MAKE) default
        touch built
@@ -29,11 +33,11 @@ config: .census
        $(options) $(MAKE) configure
        touch .census
 
-bfbuild: 
+dibuild: 
        $(checkdir)
        @echo "== dpkg-buildpackage: bootfloppies" 1>&2
        if [ ! -f mkfs/mkfs.xfs-$(bootpkg) ]; then \
-               $(bfsopts) $(MAKE) configure; \
+               $(diopts) $(MAKE) configure; \
                for dir in include libxfs libdisk mkfs; do \
                        $(MAKE) -C $$dir; \
                done; \
@@ -46,33 +50,33 @@ clean:
        $(checkdir)
        -rm -f built .census mkfs/mkfs.xfs-$(bootpkg)
        $(MAKE) distclean
-       -rm -rf $(dirtmp) $(dirdev) $(dirbfs) debian/*substvars debian/files*
+       -rm -rf $(dirtmp) $(dirdev) $(dirdi) debian/*substvars debian/files*
 
 binary-indep:
 
-# Note1: dev pkg with .so symlinks to base pkg confuses debstd;
-# so the .so 'Dangling symlink' message is benign.
-# Note2: absolute symlinks (required by policy) confuse debstd;
-# so we'll filter out symlink messages entirely now.
-# 
 binary-arch: checkroot built
        @echo "== dpkg-buildpackage: binary-arch" 1>&2
        $(checkdir)
-       -rm -rf $(dirtmp) $(dirdev) $(dirbfs)
+       -rm -rf $(dirtmp) $(dirdev) $(dirdi)
        $(pkgtmp) $(MAKE) -C . install
        $(pkgdev) $(MAKE) -C . install-dev
-       $(pkgbfs) $(MAKE) -C debian install-boot
+       $(pkgdi) $(MAKE) -C debian install-d-i
        $(pkgtmp) $(MAKE) -C build src-manifest
-       @echo "== dpkg-buildpackage: debstd" 1>&2
-       $(stdenv) debstd -m | grep -v 'Dangling symlink'
-       dpkg-gencontrol -isp -p$(package) -P$(dirtmp)
-       dpkg-gencontrol -isp -p$(develop) -P$(dirdev)
-       dpkg-gencontrol -isp -p$(bootpkg) -P$(dirbfs)
-       chown -R root.root $(dirtmp) $(dirdev) $(dirbfs)
-       chmod -R go=rX $(dirtmp) $(dirdev) $(dirbfs)
-       dpkg --build $(dirtmp) .. 
-       dpkg --build $(dirdev) ..
-       dpkg --build $(dirbfs) ..
+
+       dh_installdocs -p$(package) -p$(develop)
+       dh_installchangelogs -N$(bootpkg)
+       dh_strip
+       dh_compress
+       dh_fixperms
+       dh_makeshlibs -p$(package)
+       dh_installdeb -N$(bootpkg)
+       dh_shlibdeps
+       dh_gencontrol -N$(bootpkg)
+       dh_gencontrol -p$(bootpkg) -- -n$(udebpkg)
+
+       dh_md5sums -N$(bootpkg)
+       dh_builddeb -N$(bootpkg)
+       dh_builddeb -p$(bootpkg) --filename=$(udebpkg)
 
 binary: binary-indep binary-arch
 
index c21cfce75ad805a904af6b9d9af3dad8a95dc50b..d6b4376e9c16c542499408f896345e2cd5413ea7 100644 (file)
@@ -1,3 +1,14 @@
+xfsprogs-2.6.3 (19 January 2003)
+       - Merge Steve Langasek's work on the Debian installer
+         support for xfsprogs.
+       - Add knowledge to xfs_db about the security namespace in
+         its extended attributes commands.
+       - Sync up user/kernel source in libxfs and headers.
+       - Fix a couple of compilation warnings.
+       - Workaround for some versions of autoconf mishandling the
+         AC_CHECK_SIZEOF macro.
+       - Fix a memory leak in libxfs, most noticable in xfs_repair.
+
 xfsprogs-2.6.2 (17 December 2003)
        - Fix dev_t sizing issues in user tools - glibc uses a 64
          bit number and XFS has a 32 device bit number, confusion
index 2d00334000f3a154ba36d0dbc1ba5b0866a55f0f..7e0ed581b18b817215a3ef9792bce45ec2da8e29 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2000-2003 Silicon Graphics, Inc.  All Rights Reserved.
+# Copyright (c) 2000-2004 Silicon Graphics, Inc.  All Rights Reserved.
 #
 # This program is free software; you can redistribute it and/or modify it
 # under the terms of version 2 of the GNU General Public License as
@@ -44,10 +44,8 @@ HFILES = handle.h jdm.h libxfs.h libxlog.h swab.h xqm.h \
        xfs_log.h xfs_log_priv.h xfs_log_recover.h xfs_mount.h xfs_quota.h \
        xfs_rtalloc.h xfs_sb.h xfs_trans.h xfs_trans_space.h xfs_types.h
 
-LHFILES = xfs_acl.h xfs_cap.h xfs_mac.h
 DKHFILES = volume.h fstyp.h dvh.h
-LSRCFILES = platform_defs.h.in builddefs.in buildmacros buildrules \
-       $(LHFILES) $(DKHFILES)
+LSRCFILES = platform_defs.h.in builddefs.in buildmacros buildrules $(DKHFILES)
 LDIRT = xfs disk
 
 default install :
index bce094c29e68066aea45cb0d644c9dcbbe6f7c16..2cfaa52fe0b315f510549d4dd9a770e13c60bbb6 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2002-2003 Silicon Graphics, Inc.  All Rights Reserved.
+# Copyright (c) 2002-2004 Silicon Graphics, Inc.  All Rights Reserved.
 #
 # This program is free software; you can redistribute it and/or modify it
 # under the terms of version 2 of the GNU General Public License as
@@ -84,7 +84,6 @@ INSTALL_LTLIB = \
        cd $(TOPDIR)/$(LIBNAME)/.libs; \
        ../$(INSTALL) -m 755 -d $(PKG_LIB_DIR); \
        ../$(INSTALL) -m 644 -T so_dot_version $(LIBNAME).lai $(PKG_LIB_DIR); \
-       test "$(PKG_DISTRIBUTION)" = debian || \
        ../$(INSTALL) -T so_dot_current $(LIBNAME).lai $(PKG_LIB_DIR)
 endif
 
index a069b0b0672538649bcc798f0084c6d123e3f448..641b08e4c406e6c4be0a4e2606167c11f5f14d63 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2003 Silicon Graphics, Inc.  All Rights Reserved.
+ * Copyright (c) 2000-2004 Silicon Graphics, Inc.  All Rights Reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of version 2 of the GNU General Public License as
@@ -364,7 +364,7 @@ extern int  libxfs_inode_alloc (xfs_trans_t **, xfs_inode_t *, mode_t,
 extern void    libxfs_trans_inode_alloc_buf (xfs_trans_t *, xfs_buf_t *);
 
 extern void    libxfs_idata_realloc (xfs_inode_t *, int, int);
-extern void    libxfs_idestroy_fork (xfs_inode_t *, int);
+extern void    libxfs_idestroy_fork (xfs_inode_t *, int);
 extern int     libxfs_iread (xfs_mount_t *, xfs_trans_t *, xfs_ino_t,
                                xfs_inode_t **, xfs_daddr_t);
 extern void    libxfs_ichgtime (xfs_inode_t *, int);
diff --git a/include/xfs_acl.h b/include/xfs_acl.h
deleted file mode 100644 (file)
index 0fbaece..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * Copyright (c) 2001-2002 Silicon Graphics, Inc.  All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like.  Any license provided herein, whether implied or
- * otherwise, applies only to this software file.  Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA  94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
- */
-#ifndef __XFS_ACL_H__
-#define __XFS_ACL_H__
-
-/*
- * Access Control Lists
- */
-typedef __uint16_t     xfs_acl_perm_t;
-typedef __int32_t      xfs_acl_type_t;
-typedef __int32_t      xfs_acl_tag_t;
-typedef __int32_t      xfs_acl_id_t;
-
-#define XFS_ACL_MAX_ENTRIES 25
-#define XFS_ACL_NOT_PRESENT (-1)
-
-typedef struct xfs_acl_entry {
-       xfs_acl_tag_t   ae_tag;
-       xfs_acl_id_t    ae_id;
-       xfs_acl_perm_t  ae_perm;
-} xfs_acl_entry_t;
-
-typedef struct xfs_acl {
-       __int32_t       acl_cnt;
-       xfs_acl_entry_t acl_entry[XFS_ACL_MAX_ENTRIES];
-} xfs_acl_t;
-
-/* On-disk XFS extended attribute names */
-#define SGI_ACL_FILE   "SGI_ACL_FILE"
-#define SGI_ACL_DEFAULT        "SGI_ACL_DEFAULT"
-#define SGI_ACL_FILE_SIZE      (sizeof(SGI_ACL_FILE)-1)
-#define SGI_ACL_DEFAULT_SIZE   (sizeof(SGI_ACL_DEFAULT)-1)
-
-
-#ifdef __KERNEL__
-
-#ifdef CONFIG_XFS_POSIX_ACL
-
-struct vattr;
-struct vnode;
-struct xfs_inode;
-
-extern int xfs_acl_inherit(struct vnode *, struct vattr *, xfs_acl_t *);
-extern int xfs_acl_iaccess(struct xfs_inode *, mode_t, cred_t *);
-extern int xfs_acl_get(struct vnode *, xfs_acl_t *, xfs_acl_t *);
-extern int xfs_acl_set(struct vnode *, xfs_acl_t *, xfs_acl_t *);
-extern int xfs_acl_vtoacl(struct vnode *, xfs_acl_t *, xfs_acl_t *);
-extern int xfs_acl_vhasacl_access(struct vnode *);
-extern int xfs_acl_vhasacl_default(struct vnode *);
-extern int xfs_acl_vset(struct vnode *, void *, size_t, int);
-extern int xfs_acl_vget(struct vnode *, void *, size_t, int);
-extern int xfs_acl_vremove(struct vnode *vp, int);
-
-extern struct kmem_zone *xfs_acl_zone;
-
-#define _ACL_TYPE_ACCESS       1
-#define _ACL_TYPE_DEFAULT      2
-#define _ACL_PERM_INVALID(perm)        ((perm) & ~(ACL_READ|ACL_WRITE|ACL_EXECUTE))
-
-#define _ACL_DECL(a)           xfs_acl_t *(a) = NULL
-#define _ACL_ALLOC(a)          ((a) = kmem_zone_alloc(xfs_acl_zone, KM_SLEEP))
-#define _ACL_FREE(a)           ((a)? kmem_zone_free(xfs_acl_zone, (a)) : 0)
-#define _ACL_ZONE_INIT(z,name) ((z) = kmem_zone_init(sizeof(xfs_acl_t), name))
-#define _ACL_ZONE_DESTROY(z)   (kmem_cache_destroy(z))
-#define _ACL_INHERIT(c,v,d)    (xfs_acl_inherit(c,v,d))
-#define _ACL_GET_ACCESS(pv,pa) (xfs_acl_vtoacl(pv,pa,NULL) == 0)
-#define _ACL_GET_DEFAULT(pv,pd)        (xfs_acl_vtoacl(pv,NULL,pd) == 0)
-#define _ACL_ACCESS_EXISTS     xfs_acl_vhasacl_access
-#define _ACL_DEFAULT_EXISTS    xfs_acl_vhasacl_default
-#define _ACL_XFS_IACCESS(i,m,c) (XFS_IFORK_Q(i) ? xfs_acl_iaccess(i,m,c) : -1)
-
-#else
-#define xfs_acl_vset(v,p,sz,t) (-EOPNOTSUPP)
-#define xfs_acl_vget(v,p,sz,t) (-EOPNOTSUPP)
-#define xfs_acl_vremove(v,t)   (-EOPNOTSUPP)
-#define _ACL_DECL(a)           ((void)0)
-#define _ACL_ALLOC(a)          (1)     /* successfully allocate nothing */
-#define _ACL_FREE(a)           ((void)0)
-#define _ACL_ZONE_INIT(z,name) ((void)0)
-#define _ACL_ZONE_DESTROY(z)   ((void)0)
-#define _ACL_INHERIT(c,v,d)    (0)
-#define _ACL_GET_ACCESS(pv,pa) (0)
-#define _ACL_GET_DEFAULT(pv,pd)        (0)
-#define _ACL_ACCESS_EXISTS     (NULL)
-#define _ACL_DEFAULT_EXISTS    (NULL)
-#define _ACL_XFS_IACCESS(i,m,c) (-1)
-#endif
-
-#endif /* __KERNEL__ */
-
-#endif /* __XFS_ACL_H__ */
index 1b302a2000f0c85d53a65b578164e92358f8e672..f47e13e3934c577f6a1a62efb56ca19f3cf9e249 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2003 Silicon Graphics, Inc.  All Rights Reserved.
+ * Copyright (c) 2000-2004 Silicon Graphics, Inc.  All Rights Reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of version 2 of the GNU General Public License as
@@ -230,13 +230,6 @@ typedef struct xfs_perag
        xfs_perag_busy_t *pagb_list;    /* unstable blocks */
 } xfs_perag_t;
 
-#define XFS_AG_BYTES(bblog)    ((long long)BBSIZE << (bblog))
-#define        XFS_AG_MIN_BYTES        ((XFS_AG_BYTES(15)))    /* 16 MB */
-#define XFS_AG_MIN_BLOCKS(blog)        ((XFS_AG_BYTES(15)) >> (blog))
-#define XFS_AG_MAX_BLOCKS(blog)        ((XFS_AG_BYTES(31) - 1) >> (blog))
-
-#define XFS_MAX_AGNUMBER       ((xfs_agnumber_t)(NULLAGNUMBER - 1))
-
 #if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_AG_MAXLEVELS)
 int xfs_ag_maxlevels(struct xfs_mount *mp);
 #define        XFS_AG_MAXLEVELS(mp)            xfs_ag_maxlevels(mp)
index 97b213a4bae48eaa3cf13cdda422f437ec531580..af0ecf5b35dbdfea4aaca97b0722ac05f58f2f64 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2002 Silicon Graphics, Inc.  All Rights Reserved.
+ * Copyright (c) 2000, 2002-2004 Silicon Graphics, Inc.  All Rights Reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of version 2 of the GNU General Public License as
@@ -44,6 +44,7 @@
 
 struct attrlist;
 struct attrlist_cursor_kern;
+struct attrnames;
 struct xfs_dabuf;
 struct xfs_da_args;
 struct xfs_da_state;
@@ -72,9 +73,9 @@ struct xfs_trans;
  * to work "forw"ard.  If none matches, continue with the "forw"ard leaf
  * nodes until the hash key changes or the attribute name is found.
  *
- * We store the fact that an attribute is a ROOT versus USER attribute in
+ * We store the fact that an attribute is a ROOT/USER/SECURE attribute in
  * the leaf_entry.  The namespaces are independent only because we also look
- * at the root/user bit when we are looking for a matching attribute name.
+ * at the namespace bit when we are looking for a matching attribute name.
  *
  * We also store a "incomplete" bit in the leaf_entry.  It shows that an
  * attribute is in the middle of being created and should not be shown to
@@ -101,7 +102,7 @@ typedef struct xfs_attr_leafblock {
        struct xfs_attr_leaf_entry {    /* sorted on key, not name */
                xfs_dahash_t hashval;   /* hash value of name */
                __uint16_t nameidx;     /* index into buffer of name/value */
-               __uint8_t flags;        /* LOCAL, ROOT and INCOMPLETE flags */
+               __uint8_t flags;        /* LOCAL/ROOT/SECURE/INCOMPLETE flag */
                __uint8_t pad2;         /* unused pad byte */
        } entries[1];                   /* variable sized array */
        struct xfs_attr_leaf_name_local {
@@ -128,10 +129,12 @@ typedef struct xfs_attr_leaf_name_remote xfs_attr_leaf_name_remote_t;
  * on the system call, they are "or"ed together for various operations.
  */
 #define        XFS_ATTR_LOCAL_BIT      0       /* attr is stored locally */
-#define        XFS_ATTR_ROOT_BIT       1       /* limit access to attr to userid 0 */
+#define        XFS_ATTR_ROOT_BIT       1       /* limit access to trusted attrs */
+#define        XFS_ATTR_SECURE_BIT     2       /* limit access to secure attrs */
 #define        XFS_ATTR_INCOMPLETE_BIT 7       /* attr in middle of create/delete */
 #define XFS_ATTR_LOCAL         (1 << XFS_ATTR_LOCAL_BIT)
 #define XFS_ATTR_ROOT          (1 << XFS_ATTR_ROOT_BIT)
+#define XFS_ATTR_SECURE                (1 << XFS_ATTR_SECURE_BIT)
 #define XFS_ATTR_INCOMPLETE    (1 << XFS_ATTR_INCOMPLETE_BIT)
 
 /*
@@ -299,7 +302,8 @@ int xfs_attr_leaf_newentsize(struct xfs_da_args *args, int blocksize,
                                        int *local);
 int    xfs_attr_leaf_entsize(struct xfs_attr_leafblock *leaf, int index);
 int    xfs_attr_put_listent(struct xfs_attr_list_context *context,
-                            int ns, char *name, int namelen, int valuelen);
+                            struct attrnames *, char *name, int namelen,
+                            int valuelen);
 int    xfs_attr_rolltrans(struct xfs_trans **transp, struct xfs_inode *dp);
 
 #endif /* __XFS_ATTR_LEAF_H__ */
diff --git a/include/xfs_cap.h b/include/xfs_cap.h
deleted file mode 100644 (file)
index 2deac73..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright (c) 2000-2002 Silicon Graphics, Inc.  All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like.  Any license provided herein, whether implied or
- * otherwise, applies only to this software file.  Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA  94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
- */
-#ifndef __XFS_CAP_H__
-#define __XFS_CAP_H__
-
-/*
- * Capabilities
- */
-typedef __uint64_t xfs_cap_value_t;
-
-typedef struct xfs_cap_set {
-       xfs_cap_value_t cap_effective;  /* use in capability checks */
-       xfs_cap_value_t cap_permitted;  /* combined with file attrs */
-       xfs_cap_value_t cap_inheritable;/* pass through exec */
-} xfs_cap_set_t;
-
-/* On-disk XFS extended attribute names */
-#define SGI_CAP_FILE   "SGI_CAP_FILE"
-#define SGI_CAP_FILE_SIZE      (sizeof(SGI_CAP_FILE)-1)
-#define SGI_CAP_LINUX  "SGI_CAP_LINUX"
-#define SGI_CAP_LINUX_SIZE     (sizeof(SGI_CAP_LINUX)-1)
-
-/*
- * For Linux, we take the bitfields directly from capability.h
- * and no longer attempt to keep this attribute ondisk compatible
- * with IRIX.  Since this attribute is only set on exectuables,
- * it just doesn't make much sense to try.  We do use a different
- * named attribute though, to avoid confusion.
- */
-
-#ifdef __KERNEL__
-
-#ifdef CONFIG_FS_POSIX_CAP
-
-#include <linux/posix_cap_xattr.h>
-
-struct vnode;
-
-extern int xfs_cap_vhascap(struct vnode *);
-extern int xfs_cap_vset(struct vnode *, void *, size_t);
-extern int xfs_cap_vget(struct vnode *, void *, size_t);
-extern int xfs_cap_vremove(struct vnode *vp);
-
-#define _CAP_EXISTS            xfs_cap_vhascap
-
-#else
-#define xfs_cap_vset(v,p,sz)   (-EOPNOTSUPP)
-#define xfs_cap_vget(v,p,sz)   (-EOPNOTSUPP)
-#define xfs_cap_vremove(v)     (-EOPNOTSUPP)
-#define _CAP_EXISTS            (NULL)
-#endif
-
-#endif /* __KERNEL__ */
-
-#endif  /* __XFS_CAP_H__ */
diff --git a/include/xfs_mac.h b/include/xfs_mac.h
deleted file mode 100644 (file)
index 8d59aaf..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * Copyright (c) 2001-2002 Silicon Graphics, Inc.  All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like.  Any license provided herein, whether implied or
- * otherwise, applies only to this software file.  Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA  94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
- */
-#ifndef __XFS_MAC_H__
-#define __XFS_MAC_H__
-
-/*
- * Mandatory Access Control
- *
- * Layout of a composite MAC label:
- * ml_list contains the list of categories (MSEN) followed by the list of
- * divisions (MINT). This is actually a header for the data structure which
- * will have an ml_list with more than one element.
- *
- *      -------------------------------
- *      | ml_msen_type | ml_mint_type |
- *      -------------------------------
- *      | ml_level     | ml_grade     |
- *      -------------------------------
- *      | ml_catcount                 |
- *      -------------------------------
- *      | ml_divcount                 |
- *      -------------------------------
- *      | category 1                  |
- *      | . . .                       |
- *      | category N                  | (where N = ml_catcount)
- *      -------------------------------
- *      | division 1                  |
- *      | . . .                       |
- *      | division M                  | (where M = ml_divcount)
- *      -------------------------------
- */
-#define XFS_MAC_MAX_SETS       250
-typedef struct xfs_mac_label {
-       __uint8_t       ml_msen_type;   /* MSEN label type */
-       __uint8_t       ml_mint_type;   /* MINT label type */
-       __uint8_t       ml_level;       /* Hierarchical level */
-       __uint8_t       ml_grade;       /* Hierarchical grade */
-       __uint16_t      ml_catcount;    /* Category count */
-       __uint16_t      ml_divcount;    /* Division count */
-                                       /* Category set, then Division set */
-       __uint16_t      ml_list[XFS_MAC_MAX_SETS];
-} xfs_mac_label_t;
-
-/* MSEN label type names. Choose an upper case ASCII character.  */
-#define XFS_MSEN_ADMIN_LABEL   'A'     /* Admin: low<admin != tcsec<high */
-#define XFS_MSEN_EQUAL_LABEL   'E'     /* Wildcard - always equal */
-#define XFS_MSEN_HIGH_LABEL    'H'     /* System High - always dominates */
-#define XFS_MSEN_MLD_HIGH_LABEL        'I'     /* System High, multi-level dir */
-#define XFS_MSEN_LOW_LABEL     'L'     /* System Low - always dominated */
-#define XFS_MSEN_MLD_LABEL     'M'     /* TCSEC label on a multi-level dir */
-#define XFS_MSEN_MLD_LOW_LABEL 'N'     /* System Low, multi-level dir */
-#define XFS_MSEN_TCSEC_LABEL   'T'     /* TCSEC label */
-#define XFS_MSEN_UNKNOWN_LABEL 'U'     /* unknown label */
-
-/* MINT label type names. Choose a lower case ASCII character.  */
-#define XFS_MINT_BIBA_LABEL    'b'     /* Dual of a TCSEC label */
-#define XFS_MINT_EQUAL_LABEL   'e'     /* Wildcard - always equal */
-#define XFS_MINT_HIGH_LABEL    'h'     /* High Grade - always dominates */
-#define XFS_MINT_LOW_LABEL     'l'     /* Low Grade - always dominated */
-
-/* On-disk XFS extended attribute names */
-#define SGI_MAC_FILE   "SGI_MAC_FILE"
-#define SGI_MAC_FILE_SIZE      (sizeof(SGI_MAC_FILE)-1)
-
-
-#ifdef __KERNEL__
-
-#ifdef CONFIG_FS_POSIX_MAC
-
-/* NOT YET IMPLEMENTED */
-
-#define MACEXEC                00100
-#define MACWRITE       00200
-#define MACREAD                00400
-
-struct xfs_inode;
-extern int  xfs_mac_iaccess(struct xfs_inode *, mode_t, cred_t *);
-
-#define _MAC_XFS_IACCESS(i,m,c) (xfs_mac_iaccess(i,m,c))
-#define _MAC_VACCESS(v,c,m)    (xfs_mac_vaccess(v,c,m))
-#define _MAC_EXISTS            xfs_mac_vhaslabel
-
-#else
-#define _MAC_XFS_IACCESS(i,m,c)        (0)
-#define _MAC_VACCESS(v,c,m)    (0)
-#define _MAC_EXISTS            (NULL)
-#endif
-
-#endif /* __KERNEL__ */
-
-#endif /* __XFS_MAC_H__ */
index 554f909b49ea5384470d844d64352ec137d15788..8a4b6a85b23eae08d2e13ff22317d5086d6814c9 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2003 Silicon Graphics, Inc.  All Rights Reserved.
+ * Copyright (c) 2000-2004 Silicon Graphics, Inc.  All Rights Reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of version 2 of the GNU General Public License as
@@ -197,20 +197,4 @@ typedef enum {
        XFS_BTNUM_MAX
 } xfs_btnum_t;
 
-
-/*
- * Juggle IRIX device numbers - still used in ondisk structures
- */
-#define XFS_DEV_BITSMAJOR      14
-#define XFS_DEV_BITSMINOR      18
-#define XFS_DEV_MAXMAJ         0x1ff
-#define XFS_DEV_MAXMIN         0x3ffff
-#define XFS_DEV_MAJOR(dev)     ((int)(((unsigned)(dev)>>XFS_DEV_BITSMINOR) \
-                                   & XFS_DEV_MAXMAJ))
-#define XFS_DEV_MINOR(dev)     ((int)((dev)&XFS_DEV_MAXMIN))
-#define XFS_MKDEV(major,minor) ((xfs_dev_t)(((major)<<XFS_DEV_BITSMINOR) \
-                                   | (minor&XFS_DEV_MAXMIN)))
-
-#define XFS_DEV_TO_KDEVT(dev)  MKDEV(XFS_DEV_MAJOR(dev),XFS_DEV_MINOR(dev))
-
 #endif /* __XFS_TYPES_H__ */
index 579c0096792540fbe7eca5bf6271d5f78104a94d..0811aff4cf1cf2bf89abd21f956eaa297c89a09d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003 Silicon Graphics, Inc.  All Rights Reserved.
+ * Copyright (c) 2003-2004 Silicon Graphics, Inc.  All Rights Reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of version 2 of the GNU General Public License as
@@ -196,7 +196,7 @@ pread_f(
        cvtstr((double)total, s1, sizeof(s1));
        cvtstr(tdiv((double)total, t2), s2, sizeof(s2));
        timestr(&t2, ts, sizeof(ts));
-       printf(_("---- %s, %d ops; %s (%s/sec and %.f ops/sec)\n"),
+       printf(_("---- %s, %d ops; %s (%s/sec and %.4f ops/sec)\n"),
                s1, c, ts, s2, tdiv((double)c, t2));
        return 0;
 }
index 5848611f7b0ecdf76c1a7e42f9f7d859385e47de..8a52cfd1902aa006140c1d90e11a846da20e20bb 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003 Silicon Graphics, Inc.  All Rights Reserved.
+ * Copyright (c) 2003-2004 Silicon Graphics, Inc.  All Rights Reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of version 2 of the GNU General Public License as
@@ -180,7 +180,7 @@ pwrite_f(
        cvtstr((double)total, s1, sizeof(s1));
        cvtstr(tdiv((double)total, t2), s2, sizeof(s2));
        timestr(&t2, ts, sizeof(ts));
-       printf(_("----- %s, %d ops; %s (%s/sec and %.f ops/sec)\n"),
+       printf(_("----- %s, %d ops; %s (%s/sec and %.4f ops/sec)\n"),
                s1, c, ts, s2, tdiv((double)c, t2));
        close(fd);
        return 0;
index c169ef6f909c1629e9520216e41b524036ac7686..01adbb81cfe89aa38868f701b04d095ac91dccaf 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2003 Silicon Graphics, Inc.  All Rights Reserved.
+ * Copyright (c) 2000-2004 Silicon Graphics, Inc.  All Rights Reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of version 2 of the GNU General Public License as
 #define xfs_iread                      libxfs_iread
 #define xfs_ialloc                     libxfs_ialloc
 #define xfs_idata_realloc              libxfs_idata_realloc
-#define xfs_idestroy_fork              libxfs_idestroy_fork
+#define xfs_idestroy_fork              libxfs_idestroy_fork
 #define xfs_itobp                      libxfs_itobp
 #define xfs_ichgtime                   libxfs_ichgtime
 #define xfs_bmapi                      libxfs_bmapi
@@ -243,6 +243,7 @@ typedef struct { dev_t dev; } xfs_buftarg_t;
 #define NBPP           getpagesize()
 #define STATIC
 #define ATTR_ROOT      0x0002  /* use attrs in root namespace */
+#define ATTR_SECURE    0x0008  /* use attrs in security namespace */
 #define ktrace_t       void
 #define m_ddev_targp   m_dev
 #define unlikely(x)    (x)
index 7c4ddeead63bfba6f78ea7fa518d1b537f96d874..c3c8010a03924f8e4eed49e9ab97df8806fe641e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2002 Silicon Graphics, Inc.  All Rights Reserved.
+ * Copyright (c) 2000-2004 Silicon Graphics, Inc.  All Rights Reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of version 2 of the GNU General Public License as
@@ -263,7 +263,8 @@ xfs_attr_leaf_add_work(xfs_dabuf_t *bp, xfs_da_args_t *args, int mapindex)
                                      + INT_GET(map->size, ARCH_CONVERT));
        INT_SET(entry->hashval, ARCH_CONVERT, args->hashval);
        entry->flags = tmp ? XFS_ATTR_LOCAL : 0;
-       entry->flags |= (args->flags & ATTR_ROOT) ? XFS_ATTR_ROOT : 0;
+       entry->flags |= (args->flags & ATTR_SECURE) ? XFS_ATTR_SECURE :
+                       ((args->flags & ATTR_ROOT) ? XFS_ATTR_ROOT : 0);
        if (args->rename) {
                entry->flags |= XFS_ATTR_INCOMPLETE;
                if ((args->blkno2 == args->blkno) &&
index 1345a17c687b0e1c5c6e52652fd5de371276e160..e95bf98749833c218ef5fd754238c595c06666aa 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2002 Silicon Graphics, Inc.  All Rights Reserved.
+ * Copyright (c) 2000-2004 Silicon Graphics, Inc.  All Rights Reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of version 2 of the GNU General Public License as
@@ -1526,15 +1526,16 @@ xfs_dir2_node_addname_int(
                                        "%llu needed freesp block %lld for\n"
                                        "  data block %lld, got %lld\n"
                                        "  ifbno %llu lastfbno %d\n",
-                                       dp->i_ino,
-                                       XFS_DIR2_DB_TO_FDB(mp, dbno),
-                                       dbno, fbno,
-                                       ifbno, lastfbno);
+                                       (unsigned long long)dp->i_ino,
+                                       (long long)XFS_DIR2_DB_TO_FDB(mp, dbno),
+                                       (long long)dbno, (long long)fbno,
+                                       (unsigned long long)ifbno, lastfbno);
                                if (fblk) {
                                        cmn_err(CE_ALERT,
-                                               " fblk 0x%llu blkno %llu "
+                                               " fblk 0x%p blkno %llu "
                                                "index %d magic 0x%x\n",
-                                               fblk, fblk->blkno,
+                                               fblk,
+                                               (unsigned long long)fblk->blkno,
                                                fblk->index,
                                                fblk->magic);
                                } else {
index 99a18deb3dffe17641f003ba9efc50179ba5da36..8236a1ef87e0bae27a63895f7a4dae6f80478121 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2001 Silicon Graphics, Inc.  All Rights Reserved.
+ * Copyright (c) 2000-2001,2004 Silicon Graphics, Inc.  All Rights Reserved.
  * 
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of version 2 of the GNU General Public License as
                                                 * accept w/o warnings
                                                 */
 
+#define XFS_AG_BYTES(bblog)    ((long long)BBSIZE << (bblog))
+#define        XFS_AG_MIN_BYTES        ((XFS_AG_BYTES(15)))    /* 16 MB */
+#define XFS_AG_MIN_BLOCKS(blog)        ((XFS_AG_BYTES(15)) >> (blog))
+#define XFS_AG_MAX_BLOCKS(blog)        ((XFS_AG_BYTES(31) - 1) >> (blog))
+
+#define XFS_MAX_AGNUMBER       ((xfs_agnumber_t)(NULLAGNUMBER - 1))
+
+
 /* xfs_mkfs.c */
 extern void usage (void);
 extern int isdigits (char *str);
index 91831f4c54d06d0302314865dbb93a38d05e9749..d64129cfeeb6d77e6336a75e1a1277d3a3d90f20 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2002 Silicon Graphics, Inc.  All Rights Reserved.
+ * Copyright (c) 2000-2002,2004 Silicon Graphics, Inc.  All Rights Reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of version 2 of the GNU General Public License as
@@ -31,9 +31,6 @@
  */
 
 #include <libxfs.h>
-#include <xfs_acl.h>
-#include <xfs_cap.h>
-#include <xfs_mac.h>
 #include "globals.h"
 #include "err_protos.h"
 #include "attr_repair.h"
index 0dec185d00f69800224ab3245ac0214f1152b928..253b91f953a4270d9ff17886497b31085ed6db55 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2002 Silicon Graphics, Inc.  All Rights Reserved.
+ * Copyright (c) 2000-2002,2004 Silicon Graphics, Inc.  All Rights Reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of version 2 of the GNU General Public License as
@@ -32,6 +32,9 @@
 #ifndef _XR_ATTRREPAIR_H
 #define _XR_ATTRREPAIR_H
 
+/*
+ * Access Control Lists
+ */
 #define ACL_USER_OBJ   0x01    /* owner */
 #define ACL_USER       0x02    /* additional users */
 #define ACL_GROUP_OBJ  0x04    /* group */
 #define ACL_WRITE      02
 #define ACL_EXECUTE    01
 
+typedef __uint16_t     xfs_acl_perm_t;
+typedef __int32_t      xfs_acl_type_t;
+typedef __int32_t      xfs_acl_tag_t;
+typedef __int32_t      xfs_acl_id_t;
+
+typedef struct xfs_acl_entry {
+       xfs_acl_tag_t   ae_tag;
+       xfs_acl_id_t    ae_id;
+       xfs_acl_perm_t  ae_perm;
+} xfs_acl_entry_t;
+
+#define XFS_ACL_MAX_ENTRIES    25
+typedef struct xfs_acl {
+       __int32_t       acl_cnt;
+       xfs_acl_entry_t acl_entry[XFS_ACL_MAX_ENTRIES];
+} xfs_acl_t;
+
+#define SGI_ACL_FILE   "SGI_ACL_FILE"
+#define SGI_ACL_DEFAULT        "SGI_ACL_DEFAULT"
+#define SGI_ACL_FILE_SIZE      (sizeof(SGI_ACL_FILE)-1)
+#define SGI_ACL_DEFAULT_SIZE   (sizeof(SGI_ACL_DEFAULT)-1)
+
+
+/*
+ * Mandatory Access Control Labels (IRIX)
+ */
+#define XFS_MAC_MAX_SETS       250
+typedef struct xfs_mac_label {
+       __uint8_t       ml_msen_type;   /* MSEN label type */
+       __uint8_t       ml_mint_type;   /* MINT label type */
+       __uint8_t       ml_level;       /* Hierarchical level */
+       __uint8_t       ml_grade;       /* Hierarchical grade */
+       __uint16_t      ml_catcount;    /* Category count */
+       __uint16_t      ml_divcount;    /* Division count */
+                                       /* Category set, then Division set */
+       __uint16_t      ml_list[XFS_MAC_MAX_SETS];
+} xfs_mac_label_t;
+
+/* MSEN label type names. Choose an upper case ASCII character.  */
+#define XFS_MSEN_ADMIN_LABEL   'A'     /* Admin: low<admin != tcsec<high */
+#define XFS_MSEN_EQUAL_LABEL   'E'     /* Wildcard - always equal */
+#define XFS_MSEN_HIGH_LABEL    'H'     /* System High - always dominates */
+#define XFS_MSEN_MLD_HIGH_LABEL        'I'     /* System High, multi-level dir */
+#define XFS_MSEN_LOW_LABEL     'L'     /* System Low - always dominated */
+#define XFS_MSEN_MLD_LABEL     'M'     /* TCSEC label on a multi-level dir */
+#define XFS_MSEN_MLD_LOW_LABEL 'N'     /* System Low, multi-level dir */
+#define XFS_MSEN_TCSEC_LABEL   'T'     /* TCSEC label */
+#define XFS_MSEN_UNKNOWN_LABEL 'U'     /* unknown label */
+
+/* MINT label type names. Choose a lower case ASCII character.  */
+#define XFS_MINT_BIBA_LABEL    'b'     /* Dual of a TCSEC label */
+#define XFS_MINT_EQUAL_LABEL   'e'     /* Wildcard - always equal */
+#define XFS_MINT_HIGH_LABEL    'h'     /* High Grade - always dominates */
+#define XFS_MINT_LOW_LABEL     'l'     /* Low Grade - always dominated */
+
+#define SGI_MAC_FILE   "SGI_MAC_FILE"
+#define SGI_MAC_FILE_SIZE      (sizeof(SGI_MAC_FILE)-1)
+
+
+/*
+ * Capabilities (IRIX)
+ */
+typedef __uint64_t xfs_cap_value_t;
+
+typedef struct xfs_cap_set {
+       xfs_cap_value_t cap_effective;  /* use in capability checks */
+       xfs_cap_value_t cap_permitted;  /* combined with file attrs */
+       xfs_cap_value_t cap_inheritable;/* pass through exec */
+} xfs_cap_set_t;
+
+#define SGI_CAP_FILE   "SGI_CAP_FILE"
+#define SGI_CAP_FILE_SIZE      (sizeof(SGI_CAP_FILE)-1)
+
+
+/*
+ * External functions
+ */
 struct blkmap;
 extern int process_attributes (xfs_mount_t *, xfs_ino_t, xfs_dinode_t *,
                                struct blkmap *, int *);