diff options
author | Tim Shimmin <tes@sgi.com> | 2007-11-21 05:16:26 +0000 |
---|---|---|
committer | Tim Shimmin <tes@sgi.com> | 2007-11-21 05:16:26 +0000 |
commit | 53e2e16e7cc37297670358b1d72fee4dd1496b1a (patch) | |
tree | 20f1bb2eb9c27a13befae89c7913a73e9aaef85c | |
parent | f1ae7ff642ca2aead656ddc0d1b2c8bcd621ec9f (diff) | |
download | attr-53e2e16e7cc37297670358b1d72fee4dd1496b1a.tar.gz |
Remove outdated conversion script ea-conv.
Merge of master-melb:xfs-cmds:30111a by kenmcd.
Remove outdated conversion script ea-conv.
-rw-r--r-- | doc/CHANGES | 3 | ||||
-rw-r--r-- | doc/Makefile | 2 | ||||
-rw-r--r-- | doc/ea-conv/Makefile | 17 | ||||
-rw-r--r-- | doc/ea-conv/README | 13 | ||||
-rw-r--r-- | doc/ea-conv/ea-conv | 119 |
5 files changed, 3 insertions, 151 deletions
diff --git a/doc/CHANGES b/doc/CHANGES index dabe0cb..035f09f 100644 --- a/doc/CHANGES +++ b/doc/CHANGES @@ -1,3 +1,6 @@ +attr-2.4.41 + - remove outdated doc/ea-conv thanks to Andreas Gruenbacher + attr-2.4.40 (21 November 2007) - Address compilation warning about signedness in libattr.c - A number of changes from Andreas Gruenbacher: diff --git a/doc/Makefile b/doc/Makefile index e2ad157..54d8d4c 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -5,8 +5,6 @@ TOPDIR = .. include $(TOPDIR)/include/builddefs -SUBDIRS = ea-conv - LSRCFILES = INSTALL PORTING CHANGES COPYING LDIRT = *.gz diff --git a/doc/ea-conv/Makefile b/doc/ea-conv/Makefile deleted file mode 100644 index 6627873..0000000 --- a/doc/ea-conv/Makefile +++ /dev/null @@ -1,17 +0,0 @@ -# -# Copyright (c) 2000, 2002 Silicon Graphics, Inc. All Rights Reserved. -# - -TOPDIR = ../.. -include $(TOPDIR)/include/builddefs - -LSRCFILES = README ea-conv - -include $(BUILDRULES) - -install: default - $(INSTALL) -m 755 -d $(PKG_DOC_DIR)/ea-conv - $(INSTALL) -m 644 README $(PKG_DOC_DIR)/ea-conv - $(INSTALL) -m 755 ea-conv $(PKG_DOC_DIR)/ea-conv - -default install-dev install-lib: diff --git a/doc/ea-conv/README b/doc/ea-conv/README deleted file mode 100644 index aaf6b3a..0000000 --- a/doc/ea-conv/README +++ /dev/null @@ -1,13 +0,0 @@ -ea-conv -- convert between aget and getfattr format - -This script converts between the extended attribute text formats of -getfattr and its predecessor, aget. To get all attributes with aget -and convert the result to getfattr format, use the following command: - - aget -Rds -e hex . | ea-conv - - -To get all attributes with getfattr and convert the result to aget -format, use the following command: - - getfattr -Rd -m - -e hex . | ea-conv - - diff --git a/doc/ea-conv/ea-conv b/doc/ea-conv/ea-conv deleted file mode 100644 index a51b512..0000000 --- a/doc/ea-conv/ea-conv +++ /dev/null @@ -1,119 +0,0 @@ -#!/usr/bin/perl -w - -use strict; -use FileHandle; - -sub convert_acl($) -{ - my ($value) = @_; - - local $_ = $value; - - die "ACL value must be hex encoded\n" unless (s/^0x//); - s/\s//g; - - my ($x4, $x8) = ('([0-9A-Fa-f]{4})', '([0-9A-Fa-f]{8})'); - - if (s/^01000000//) { - my $new_value = '0x02000000 '; - while ($_ ne '') { - if (s/^(0100|0400|1000|2000)$x4//) { - $new_value .= "$1$2ffffffff "; - } elsif (s/^(0200|0800)$x4$x8//) { - $new_value .= "$1$2$3 "; - } else { - die "ACL format not recognized\n" - } - } - return $new_value; - } elsif (s/^02000000//) { - my $new_value = '0x01000000 '; - while ($_ ne '') { - if (s/^(0100|0400|1000|2000)$x4$x8//) { - $new_value .= "$1$2 "; - } elsif (s/^(0200|0800)$x4$x8//) { - $new_value .= "$1$2$3 "; - } else { - die "ACL format not recognized\n" - } - } - return $new_value; - } else { - die "ACL format not recognized\n" - } -} - -sub check_name($) { - my ($name) = @_; - if ($name =~ m[^[^A-Za-z]]) { - print STDERR "Renaming attribute `user.$name' to `X$name'.\n"; - return "X$name"; - } - return $name; -} - -sub convert($) { - my ($file) = @_; - - eval { - while (<$file>) { - m[^(#.*)?$] || - s[^system\.posix_acl_access=(0x02.*)] - ['$acl=' . convert_acl($1)]e || - s[^system\.posix_acl_default=(0x02.*)] - ['$defacl=' . convert_acl($1)]e || - s[^user\.([^=]*)][check_name($1)]e || - - s[^\$acl=(0x01.*)] - ['system.posix_acl_access=' . - convert_acl($1)]e || - s[^\$defacl=(0x01.*)] - ['system.posix_acl_default=' . - convert_acl($1)]e || - s[^([A-Za-z][^=]*)][user.$1] || - - die "Input format error\n"; - - print; - } - }; - if ($@) { - chomp $@; - print STDERR "$@ in line $..\n"; - } - return (not $@); -} - -unless (@ARGV) { - printf STDERR <<EOF; -$0 -- convert between aget and getfattr format - -This script converts between the extended attribute text formats of -getfattr and its predecessor, aget. To get all attributes with aget -and convert the result to getfattr format, use the following command: - - aget -Rds -e hex . | $0 - - -To get all attributes with getfattr and convert the result to aget -format, use the following command: - - getfattr -Rd -m - -e hex . | $0 - - -EOF - exit 1; -} - -my $good = 1; -foreach my $arg (@ARGV) { - my $fh = ($arg eq '-') ? *STDIN : new FileHandle($arg); - - unless ($fh) { - print STDERR "$0: $arg: $!\n"; - next; - } - - $good = 0 unless convert $fh; - - $fh->close unless ($arg eq '-'); -} -exit (not $good); |