Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/compat/netbsd32 Add the *xattr(2) family of syscalls. J...
details: https://anonhg.NetBSD.org/src/rev/359bfc5ab0b3
branches: trunk
changeset: 582936:359bfc5ab0b3
user: cube <cube%NetBSD.org@localhost>
date: Tue Jul 12 07:45:34 2005 +0000
description:
Add the *xattr(2) family of syscalls. Just like the *extattr(2) family,
they're waiting for an actual FS back-end to be tested, but are still
straightforward enough.
diffstat:
sys/compat/netbsd32/netbsd32_netbsd.c | 196 +++++++++++++++++++++++++++++++++-
sys/compat/netbsd32/syscalls.master | 32 +++++-
2 files changed, 225 insertions(+), 3 deletions(-)
diffs (257 lines):
diff -r f79f4d698ae4 -r 359bfc5ab0b3 sys/compat/netbsd32/netbsd32_netbsd.c
--- a/sys/compat/netbsd32/netbsd32_netbsd.c Tue Jul 12 07:33:39 2005 +0000
+++ b/sys/compat/netbsd32/netbsd32_netbsd.c Tue Jul 12 07:45:34 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: netbsd32_netbsd.c,v 1.95 2005/07/11 20:18:05 cube Exp $ */
+/* $NetBSD: netbsd32_netbsd.c,v 1.96 2005/07/12 07:45:34 cube Exp $ */
/*
* Copyright (c) 1998, 2001 Matthew R. Green
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.95 2005/07/11 20:18:05 cube Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.96 2005/07/12 07:45:34 cube Exp $");
#if defined(_KERNEL_OPT)
#include "opt_ddb.h"
@@ -2591,3 +2591,195 @@
NETBSD32TO64_UAP(op);
return sys_rasctl(l, &ua, retval);
}
+
+int
+netbsd32_setxattr(struct lwp *l, void *v, register_t *retval)
+{
+ struct netbsd32_setxattr_args /* {
+ syscallarg(const netbsd32_charp) path;
+ syscallarg(const netbsd32_charp) name;
+ syscallarg(netbsd32_voidp) value;
+ syscallarg(netbsd32_size_t) size;
+ syscallarg(int) flags;
+ } */ *uap = v;
+ struct sys_setxattr_args ua;
+ NETBSD32TOP_UAP(path, const char);
+ NETBSD32TOP_UAP(name, const char);
+ NETBSD32TOP_UAP(value, void);
+ NETBSD32TOX_UAP(size, size_t);
+ NETBSD32TO64_UAP(flags);
+ return sys_setxattr(l, &ua, retval);
+}
+
+int
+netbsd32_lsetxattr(struct lwp *l, void *v, register_t *retval)
+{
+ struct netbsd32_lsetxattr_args /* {
+ syscallarg(const netbsd32_charp) path;
+ syscallarg(const netbsd32_charp) name;
+ syscallarg(netbsd32_voidp) value;
+ syscallarg(netbsd32_size_t) size;
+ syscallarg(int) flags;
+ } */ *uap = v;
+ struct sys_lsetxattr_args ua;
+ NETBSD32TOP_UAP(path, const char);
+ NETBSD32TOP_UAP(name, const char);
+ NETBSD32TOP_UAP(value, void);
+ NETBSD32TOX_UAP(size, size_t);
+ NETBSD32TO64_UAP(flags);
+ return sys_lsetxattr(l, &ua, retval);
+}
+
+int
+netbsd32_fsetxattr(struct lwp *l, void *v, register_t *retval)
+{
+ struct netbsd32_fsetxattr_args /* {
+ syscallarg(int) fd;
+ syscallarg(const netbsd32_charp) name;
+ syscallarg(netbsd32_voidp) value;
+ syscallarg(netbsd32_size_t) size;
+ syscallarg(int) flags;
+ } */ *uap = v;
+ struct sys_fsetxattr_args ua;
+ NETBSD32TO64_UAP(fd);
+ NETBSD32TOP_UAP(name, const char);
+ NETBSD32TOP_UAP(value, void);
+ NETBSD32TOX_UAP(size, size_t);
+ NETBSD32TO64_UAP(flags);
+ return sys_fsetxattr(l, &ua, retval);
+}
+
+int
+netbsd32_getxattr(struct lwp *l, void *v, register_t *retval)
+{
+ struct netbsd32_getxattr_args /* {
+ syscallarg(const netbsd32_charp) path;
+ syscallarg(const netbsd32_charp) name;
+ syscallarg(netbsd32_voidp) value;
+ syscallarg(netbsd32_size_t) size;
+ } */ *uap = v;
+ struct sys_getxattr_args ua;
+ NETBSD32TOP_UAP(path, const char);
+ NETBSD32TOP_UAP(name, const char);
+ NETBSD32TOP_UAP(value, void);
+ NETBSD32TOX_UAP(size, size_t);
+ return sys_getxattr(l, &ua, retval);
+}
+
+int
+netbsd32_lgetxattr(struct lwp *l, void *v, register_t *retval)
+{
+ struct netbsd32_lgetxattr_args /* {
+ syscallarg(const netbsd32_charp) path;
+ syscallarg(const netbsd32_charp) name;
+ syscallarg(netbsd32_voidp) value;
+ syscallarg(netbsd32_size_t) size;
+ } */ *uap = v;
+ struct sys_lgetxattr_args ua;
+ NETBSD32TOP_UAP(path, const char);
+ NETBSD32TOP_UAP(name, const char);
+ NETBSD32TOP_UAP(value, void);
+ NETBSD32TOX_UAP(size, size_t);
+ return sys_lgetxattr(l, &ua, retval);
+}
+
+int
+netbsd32_fgetxattr(struct lwp *l, void *v, register_t *retval)
+{
+ struct netbsd32_fgetxattr_args /* {
+ syscallarg(int) fd;
+ syscallarg(const netbsd32_charp) name;
+ syscallarg(netbsd32_voidp) value;
+ syscallarg(netbsd32_size_t) size;
+ } */ *uap = v;
+ struct sys_fgetxattr_args ua;
+ NETBSD32TO64_UAP(fd);
+ NETBSD32TOP_UAP(name, const char);
+ NETBSD32TOP_UAP(value, void);
+ NETBSD32TOX_UAP(size, size_t);
+ return sys_fgetxattr(l, &ua, retval);
+}
+
+int
+netbsd32_listxattr(struct lwp *l, void *v, register_t *retval)
+{
+ struct netbsd32_listxattr_args /* {
+ syscallarg(const netbsd32_charp) path;
+ syscallarg(netbsd32_charp) list;
+ syscallarg(netbsd32_size_t) size;
+ } */ *uap = v;
+ struct sys_listxattr_args ua;
+ NETBSD32TOP_UAP(path, const char);
+ NETBSD32TOP_UAP(list, char);
+ NETBSD32TOX_UAP(size, size_t);
+ return sys_listxattr(l, &ua, retval);
+}
+
+int
+netbsd32_llistxattr(struct lwp *l, void *v, register_t *retval)
+{
+ struct netbsd32_llistxattr_args /* {
+ syscallarg(const netbsd32_charp) path;
+ syscallarg(netbsd32_charp) list;
+ syscallarg(netbsd32_size_t) size;
+ } */ *uap = v;
+ struct sys_llistxattr_args ua;
+ NETBSD32TOP_UAP(path, const char);
+ NETBSD32TOP_UAP(list, char);
+ NETBSD32TOX_UAP(size, size_t);
+ return sys_llistxattr(l, &ua, retval);
+}
+
+int
+netbsd32_flistxattr(struct lwp *l, void *v, register_t *retval)
+{
+ struct netbsd32_flistxattr_args /* {
+ syscallarg(int) fd;
+ syscallarg(netbsd32_charp) list;
+ syscallarg(netbsd32_size_t) size;
+ } */ *uap = v;
+ struct sys_flistxattr_args ua;
+ NETBSD32TO64_UAP(fd);
+ NETBSD32TOP_UAP(list, char);
+ NETBSD32TOX_UAP(size, size_t);
+ return sys_flistxattr(l, &ua, retval);
+}
+
+int
+netbsd32_removexattr(struct lwp *l, void *v, register_t *retval)
+{
+ struct netbsd32_removexattr_args /* {
+ syscallarg(const netbsd32_charp) path;
+ syscallarg(const netbsd32_charp) name;
+ } */ *uap = v;
+ struct sys_removexattr_args ua;
+ NETBSD32TOP_UAP(path, const char);
+ NETBSD32TOP_UAP(name, const char);
+ return sys_removexattr(l, &ua, retval);
+}
+
+int
+netbsd32_lremovexattr(struct lwp *l, void *v, register_t *retval)
+{
+ struct netbsd32_lremovexattr_args /* {
+ syscallarg(const netbsd32_charp) path;
+ syscallarg(const netbsd32_charp) name;
+ } */ *uap = v;
+ struct sys_lremovexattr_args ua;
+ NETBSD32TOP_UAP(path, const char);
+ NETBSD32TOP_UAP(name, const char);
+ return sys_lremovexattr(l, &ua, retval);
+}
+
+int
+netbsd32_fremovexattr(struct lwp *l, void *v, register_t *retval)
+{
+ struct netbsd32_fremovexattr_args /* {
+ syscallarg(int) fd;
+ syscallarg(const netbsd32_charp) name;
+ } */ *uap = v;
+ struct sys_fremovexattr_args ua;
+ NETBSD32TO64_UAP(fd);
+ NETBSD32TOP_UAP(name, const char);
+ return sys_fremovexattr(l, &ua, retval);
+}
diff -r f79f4d698ae4 -r 359bfc5ab0b3 sys/compat/netbsd32/syscalls.master
--- a/sys/compat/netbsd32/syscalls.master Tue Jul 12 07:33:39 2005 +0000
+++ b/sys/compat/netbsd32/syscalls.master Tue Jul 12 07:45:34 2005 +0000
@@ -1,4 +1,4 @@
- $NetBSD: syscalls.master,v 1.34 2005/07/11 20:18:05 cube Exp $
+ $NetBSD: syscalls.master,v 1.35 2005/07/12 07:45:34 cube Exp $
; from: NetBSD: syscalls.master,v 1.81 1998/07/05 08:49:50 jonathan Exp
; @(#)syscalls.master 8.2 (Berkeley) 1/13/94
@@ -604,3 +604,33 @@
const netbsd32_timespecp_t ts, const netbsd32_sigsetp_t mask); }
374 STD { int netbsd32_pollts(netbsd32_pollfdp_t fds, u_int nfds, \
const netbsd32_timespecp_t ts, const netbsd32_sigsetp_t mask); }
+375 STD { int netbsd32_setxattr(const netbsd32_charp path, \
+ const netbsd32_charp name, netbsd32_voidp value, \
+ netbsd32_size_t size, int flags); }
+376 STD { int netbsd32_lsetxattr(const netbsd32_charp path, \
+ const netbsd32_charp name, netbsd32_voidp value, \
+ netbsd32_size_t size, int flags); }
+377 STD { int netbsd32_fsetxattr(int fd, \
+ const netbsd32_charp name, netbsd32_voidp value, \
+ netbsd32_size_t size, int flags); }
+378 STD { int netbsd32_getxattr(const netbsd32_charp path, \
+ const netbsd32_charp name, netbsd32_voidp value, \
+ netbsd32_size_t size); }
+379 STD { int netbsd32_lgetxattr(const netbsd32_charp path, \
+ const netbsd32_charp name, netbsd32_voidp value, \
+ netbsd32_size_t size); }
+380 STD { int netbsd32_fgetxattr(int fd, \
+ const netbsd32_charp name, netbsd32_voidp value, \
+ netbsd32_size_t size); }
+381 STD { int netbsd32_listxattr(const netbsd32_charp path, \
+ netbsd32_charp list, netbsd32_size_t size); }
+382 STD { int netbsd32_llistxattr(const netbsd32_charp path, \
+ netbsd32_charp list, netbsd32_size_t size); }
+383 STD { int netbsd32_flistxattr(int fd, \
+ netbsd32_charp list, netbsd32_size_t size); }
+384 STD { int netbsd32_removexattr(const netbsd32_charp path, \
+ const netbsd32_charp name); }
+385 STD { int netbsd32_lremovexattr(const netbsd32_charp path, \
+ const netbsd32_charp name); }
+386 STD { int netbsd32_fremovexattr(int fd, \
+ const netbsd32_charp name); }
Home |
Main Index |
Thread Index |
Old Index