xfs
[Top] [All Lists]

Re: extended attributes support on powerpc

To: linux-xfs@xxxxxxxxxxx
Subject: Re: extended attributes support on powerpc
From: Ethan Benson <erbenson@xxxxxxxxxx>
Date: Sun, 27 Jan 2002 20:36:24 -0900
In-reply-to: <3368.1012190591@xxxxxxxxxxxxxxxxxxxxx>; from kaos@xxxxxxx on Mon, Jan 28, 2002 at 03:03:11PM +1100
Mail-copies-to: nobody
Mail-followup-to: linux-xfs@xxxxxxxxxxx
References: <20020127184724.L14742@xxxxxxxxxxxxxxx> <3368.1012190591@xxxxxxxxxxxxxxxxxxxxx>
Sender: owner-linux-xfs@xxxxxxxxxxx
User-agent: Mutt/1.2.5i
On Mon, Jan 28, 2002 at 03:03:11PM +1100, Keith Owens wrote:
> On Sun, 27 Jan 2002 18:47:24 -0900, 
> Ethan Benson <erbenson@xxxxxxxxxx> wrote:
> >i assume the numbering doesn't affect userland at all, its only used
> >for internal compilation of the kernel correct?
> 
> The syscall numbers are also used by the ACL programs.  In XFS CVS
> theye are in cmd/attr/libattr/attr.c at line 292.  Forgot about those,
> I don't work on the user space commands.

OK, i patched the kernel and attr, rebuilt the attr package and things
appear to be working properly.

my patches don't include the extra empty `placeholder' syscalls to
avoid conflicts with future syscall additions.  

would you be willing to add the necessary syscalls to powerpc in the
xfs CVS tree? 

here are the patches (i haven't checked if the acl package needs
patching too yet):

diff -urN linux-2.4.17.orig/arch/ppc/kernel/misc.S 
linux-2.4.17/arch/ppc/kernel/misc.S
--- linux-2.4.17.orig/arch/ppc/kernel/misc.S    Sat Jan 26 01:53:59 2002
+++ linux-2.4.17/arch/ppc/kernel/misc.S Sun Jan 27 18:55:09 2002
@@ -1122,6 +1122,15 @@
        .long sys_madvise       /* 205 */
        .long sys_mincore
        .long sys_gettid
+#ifdef CONFIG_HAVE_ATTRCTL
+       .long sys_attrctl
+       .long sys_acl_get
+       .long sys_acl_set       /* 210 */
+#else
+       .long sys_ni_syscall
+       .long sys_ni_syscall
+       .long sys_ni_syscall    /* 210 */
+#endif  /* CONFIG_HAVE_ATTRCTL */      
        .rept NR_syscalls-(.-sys_call_table)/4
                .long sys_ni_syscall
        .endr
diff -urN linux-2.4.17.orig/include/asm-ppc/unistd.h 
linux-2.4.17/include/asm-ppc/unistd.h
--- linux-2.4.17.orig/include/asm-ppc/unistd.h  Fri Nov  2 16:43:54 2001
+++ linux-2.4.17/include/asm-ppc/unistd.h       Sun Jan 27 19:33:57 2002
@@ -215,6 +215,9 @@
 #define __NR_madvise           205
 #define __NR_mincore           206
 #define __NR_gettid            207
+#define __NR__attrctl          208
+#define __NR__acl_get          209
+#define __NR__acl_set          210
 
 #define __NR(n)        #n
 

and the libattr patch:

diff -urN attr-1.1.4.orig/libattr/attr.c attr-1.1.4/libattr/attr.c
--- attr-1.1.4.orig/libattr/attr.c      Thu Jan 10 12:40:29 2002
+++ attr-1.1.4/libattr/attr.c   Sun Jan 27 19:30:36 2002
@@ -303,6 +303,11 @@
 #  ifndef SYS__attrctl
 #    define SYS__attrctl       1260
 #  endif
+#elif __powerpc__
+#  define HAVE_ACL_SYSCALL 1
+#  ifndef SYS__attrctl
+#    define SYS__attrctl       208
+#  endif
 #else
 #  define HAVE_ACL_SYSCALL 0
 #endif


-- 
Ethan Benson
http://www.alaska.net/~erbenson/

Attachment: pgp8oIq9MuHyD.pgp
Description: PGP signature

<Prev in Thread] Current Thread [Next in Thread>