Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/compat/netbsd32 Implement the extattr(3) family of sysca...
details: https://anonhg.NetBSD.org/src/rev/daf5396c2156
branches: trunk
changeset: 582847:daf5396c2156
user: cube <cube%NetBSD.org@localhost>
date: Fri Jul 08 21:39:39 2005 +0000
description:
Implement the extattr(3) family of syscalls.
XXX However, those remain untested as there are currently no backend for
XXX extattr(9) in NetBSD.
diffstat:
sys/compat/netbsd32/netbsd32_netbsd.c | 246 +++++++++++++++++++++++++++++++++-
sys/compat/netbsd32/syscalls.master | 38 +++++-
2 files changed, 281 insertions(+), 3 deletions(-)
diffs (truncated from 313 to 300 lines):
diff -r 2e1efa527907 -r daf5396c2156 sys/compat/netbsd32/netbsd32_netbsd.c
--- a/sys/compat/netbsd32/netbsd32_netbsd.c Fri Jul 08 16:13:32 2005 +0000
+++ b/sys/compat/netbsd32/netbsd32_netbsd.c Fri Jul 08 21:39:39 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: netbsd32_netbsd.c,v 1.90 2005/07/04 00:26:06 cube Exp $ */
+/* $NetBSD: netbsd32_netbsd.c,v 1.91 2005/07/08 21:39:39 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.90 2005/07/04 00:26:06 cube Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.91 2005/07/08 21:39:39 cube Exp $");
#if defined(_KERNEL_OPT)
#include "opt_ddb.h"
@@ -2286,3 +2286,245 @@
NETBSD32TO64_UAP(count);
return (sys_uuidgen(l, &ua, retval));
}
+
+int
+netbsd32_extattrctl(struct lwp *l, void *v, register_t *retval)
+{
+ struct netbsd32_extattrctl_args /* {
+ syscallarg(const netbsd32_charp) path;
+ syscallarg(int) cmd;
+ syscallarg(const netbsd32_charp) filename;
+ syscallarg(int) attrnamespace;
+ syscallarg(const netbsd32_charp) attrname;
+ } */ *uap = v;
+ struct sys_extattrctl_args ua;
+
+ NETBSD32TOP_UAP(path, const char);
+ NETBSD32TO64_UAP(cmd);
+ NETBSD32TOP_UAP(filename, const char);
+ NETBSD32TO64_UAP(attrnamespace);
+ NETBSD32TOP_UAP(attrname, const char);
+ return sys_extattrctl(l, &ua, retval);
+}
+
+int
+netbsd32_extattr_set_fd(struct lwp *l, void *v, register_t *retval)
+{
+ struct netbsd32_extattr_set_fd_args /* {
+ syscallarg(int) fd;
+ syscallarg(int) attrnamespace;
+ syscallarg(const netbsd32_charp) attrname;
+ syscallarg(const netbsd32_voidp) data;
+ syscallarg(netbsd32_size_t) nbytes;
+ } */ *uap = v;
+ struct sys_extattr_set_fd_args ua;
+
+ NETBSD32TO64_UAP(fd);
+ NETBSD32TO64_UAP(attrnamespace);
+ NETBSD32TOP_UAP(attrname, const char);
+ NETBSD32TOP_UAP(data, const void);
+ NETBSD32TOX_UAP(nbytes, size_t);
+ return sys_extattr_set_fd(l, &ua, retval);
+}
+
+int
+netbsd32_extattr_set_file(struct lwp *l, void *v, register_t *retval)
+{
+ struct netbsd32_extattr_set_file_args /* {
+ syscallarg(const netbsd32_charp) path;
+ syscallarg(int) attrnamespace;
+ syscallarg(const netbsd32_charp) attrname;
+ syscallarg(const netbsd32_voidp) data;
+ syscallarg(netbsd32_size_t) nbytes;
+ } */ *uap = v;
+ struct sys_extattr_set_file_args ua;
+
+ NETBSD32TOP_UAP(path, const char);
+ NETBSD32TO64_UAP(attrnamespace);
+ NETBSD32TOP_UAP(attrname, const char);
+ NETBSD32TOP_UAP(data, const void);
+ NETBSD32TOX_UAP(nbytes, size_t);
+ return sys_extattr_set_file(l, &ua, retval);
+}
+
+int
+netbsd32_extattr_set_link(struct lwp *l, void *v, register_t *retval)
+{
+ struct netbsd32_extattr_set_link_args /* {
+ syscallarg(const netbsd32_charp) path;
+ syscallarg(int) attrnamespace;
+ syscallarg(const netbsd32_charp) attrname;
+ syscallarg(const netbsd32_voidp) data;
+ syscallarg(netbsd32_size_t) nbytes;
+ } */ *uap = v;
+ struct sys_extattr_set_link_args ua;
+
+ NETBSD32TOP_UAP(path, const char);
+ NETBSD32TO64_UAP(attrnamespace);
+ NETBSD32TOP_UAP(attrname, const char);
+ NETBSD32TOP_UAP(data, const void);
+ NETBSD32TOX_UAP(nbytes, size_t);
+ return sys_extattr_set_link(l, &ua, retval);
+}
+
+int
+netbsd32_extattr_get_fd(struct lwp *l, void *v, register_t *retval)
+{
+ struct netbsd32_extattr_get_fd_args /* {
+ syscallarg(int) fd;
+ syscallarg(int) attrnamespace;
+ syscallarg(const netbsd32_charp) attrname;
+ syscallarg(netbsd32_voidp) data;
+ syscallarg(netbsd32_size_t) nbytes;
+ } */ *uap = v;
+ struct sys_extattr_get_fd_args ua;
+
+ NETBSD32TO64_UAP(fd);
+ NETBSD32TO64_UAP(attrnamespace);
+ NETBSD32TOP_UAP(attrname, const char);
+ NETBSD32TOP_UAP(data, void);
+ NETBSD32TOX_UAP(nbytes, size_t);
+ return sys_extattr_get_fd(l, &ua, retval);
+}
+
+int
+netbsd32_extattr_get_file(struct lwp *l, void *v, register_t *retval)
+{
+ struct netbsd32_extattr_get_file_args /* {
+ syscallarg(const netbsd32_charp) path;
+ syscallarg(int) attrnamespace;
+ syscallarg(const netbsd32_charp) attrname;
+ syscallarg(netbsd32_voidp) data;
+ syscallarg(netbsd32_size_t) nbytes;
+ } */ *uap = v;
+ struct sys_extattr_get_file_args ua;
+
+ NETBSD32TOP_UAP(path, const char);
+ NETBSD32TO64_UAP(attrnamespace);
+ NETBSD32TOP_UAP(attrname, const char);
+ NETBSD32TOP_UAP(data, void);
+ NETBSD32TOX_UAP(nbytes, size_t);
+ return sys_extattr_get_file(l, &ua, retval);
+}
+
+int
+netbsd32_extattr_get_link(struct lwp *l, void *v, register_t *retval)
+{
+ struct netbsd32_extattr_get_link_args /* {
+ syscallarg(const netbsd32_charp) path;
+ syscallarg(int) attrnamespace;
+ syscallarg(const netbsd32_charp) attrname;
+ syscallarg(netbsd32_voidp) data;
+ syscallarg(netbsd32_size_t) nbytes;
+ } */ *uap = v;
+ struct sys_extattr_get_link_args ua;
+
+ NETBSD32TOP_UAP(path, const char);
+ NETBSD32TO64_UAP(attrnamespace);
+ NETBSD32TOP_UAP(attrname, const char);
+ NETBSD32TOP_UAP(data, void);
+ NETBSD32TOX_UAP(nbytes, size_t);
+ return sys_extattr_get_link(l, &ua, retval);
+}
+
+int
+netbsd32_extattr_delete_fd(struct lwp *l, void *v, register_t *retval)
+{
+ struct netbsd32_extattr_delete_fd_args /* {
+ syscallarg(int) fd;
+ syscallarg(int) attrnamespace;
+ syscallarg(const netbsd32_charp) attrname;
+ } */ *uap = v;
+ struct sys_extattr_delete_fd_args ua;
+
+ NETBSD32TO64_UAP(fd);
+ NETBSD32TO64_UAP(attrnamespace);
+ NETBSD32TOP_UAP(attrname, const char);
+ return sys_extattr_delete_fd(l, &ua, retval);
+}
+
+int
+netbsd32_extattr_delete_file(struct lwp *l, void *v, register_t *retval)
+{
+ struct netbsd32_extattr_delete_file_args /* {
+ syscallarg(const netbsd32_charp) path;
+ syscallarg(int) attrnamespace;
+ syscallarg(const netbsd32_charp) attrname;
+ } */ *uap = v;
+ struct sys_extattr_delete_file_args ua;
+
+ NETBSD32TOP_UAP(path, const char);
+ NETBSD32TO64_UAP(attrnamespace);
+ NETBSD32TOP_UAP(attrname, const char);
+ return sys_extattr_delete_file(l, &ua, retval);
+}
+
+int
+netbsd32_extattr_delete_link(struct lwp *l, void *v, register_t *retval)
+{
+ struct netbsd32_extattr_delete_link_args /* {
+ syscallarg(const netbsd32_charp) path;
+ syscallarg(int) attrnamespace;
+ syscallarg(const netbsd32_charp) attrname;
+ } */ *uap = v;
+ struct sys_extattr_delete_link_args ua;
+
+ NETBSD32TOP_UAP(path, const char);
+ NETBSD32TO64_UAP(attrnamespace);
+ NETBSD32TOP_UAP(attrname, const char);
+ return sys_extattr_delete_link(l, &ua, retval);
+}
+
+int
+netbsd32_extattr_list_fd(struct lwp *l, void *v, register_t *retval)
+{
+ struct netbsd32_extattr_list_fd_args /* {
+ syscallarg(int) fd;
+ syscallarg(int) attrnamespace;
+ syscallarg(netbsd32_voidp) data;
+ syscallarg(netbsd32_size_t) nbytes;
+ } */ *uap = v;
+ struct sys_extattr_list_fd_args ua;
+
+ NETBSD32TO64_UAP(fd);
+ NETBSD32TO64_UAP(attrnamespace);
+ NETBSD32TOP_UAP(data, void);
+ NETBSD32TOX_UAP(nbytes, size_t);
+ return sys_extattr_list_fd(l, &ua, retval);
+}
+
+int
+netbsd32_extattr_list_file(struct lwp *l, void *v, register_t *retval)
+{
+ struct netbsd32_extattr_list_file_args /* {
+ syscallarg(const netbsd32_charp) path;
+ syscallarg(int) attrnamespace;
+ syscallarg(netbsd32_voidp) data;
+ syscallarg(netbsd32_size_t) nbytes;
+ } */ *uap = v;
+ struct sys_extattr_list_file_args ua;
+
+ NETBSD32TOP_UAP(path, const char);
+ NETBSD32TO64_UAP(attrnamespace);
+ NETBSD32TOP_UAP(data, void);
+ NETBSD32TOX_UAP(nbytes, size_t);
+ return sys_extattr_list_file(l, &ua, retval);
+}
+
+int
+netbsd32_extattr_list_link(struct lwp *l, void *v, register_t *retval)
+{
+ struct netbsd32_extattr_list_link_args /* {
+ syscallarg(const netbsd32_charp) path;
+ syscallarg(int) attrnamespace;
+ syscallarg(netbsd32_voidp) data;
+ syscallarg(netbsd32_size_t) nbytes;
+ } */ *uap = v;
+ struct sys_extattr_list_link_args ua;
+
+ NETBSD32TOP_UAP(path, const char);
+ NETBSD32TO64_UAP(attrnamespace);
+ NETBSD32TOP_UAP(data, void);
+ NETBSD32TOX_UAP(nbytes, size_t);
+ return sys_extattr_list_link(l, &ua, retval);
+}
diff -r 2e1efa527907 -r daf5396c2156 sys/compat/netbsd32/syscalls.master
--- a/sys/compat/netbsd32/syscalls.master Fri Jul 08 16:13:32 2005 +0000
+++ b/sys/compat/netbsd32/syscalls.master Fri Jul 08 21:39:39 2005 +0000
@@ -1,4 +1,4 @@
- $NetBSD: syscalls.master,v 1.28 2005/07/04 00:26:07 cube Exp $
+ $NetBSD: syscalls.master,v 1.29 2005/07/08 21:39:39 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
@@ -561,3 +561,39 @@
int flags); }
359 STD { int netbsd32_fhstatvfs1(const netbsd32_fhandlep_t fhp, \
netbsd32_statvfsp_t buf, int flags); }
+360 STD { int netbsd32_extattrctl(const netbsd32_charp path, \
+ int cmd, const netbsd32_charp filename, int attrnamespace, \
+ const netbsd32_charp attrname); }
+361 STD { int netbsd32_extattr_set_file(const netbsd32_charp path, \
+ int attrnamespace, const netbsd32_charp attrname, \
+ const netbsd32_voidp data, netbsd32_size_t nbytes); }
+362 STD { int netbsd32_extattr_get_file(const netbsd32_charp path, \
+ int attrnamespace, const netbsd32_charp attrname, \
+ netbsd32_voidp data, netbsd32_size_t nbytes); }
+363 STD { int netbsd32_extattr_delete_file(const netbsd32_charp path, \
+ int attrnamespace, const netbsd32_charp attrname); }
+364 STD { int netbsd32_extattr_set_fd(int fd, \
+ int attrnamespace, const netbsd32_charp attrname, \
+ const netbsd32_voidp data, netbsd32_size_t nbytes); }
+365 STD { int netbsd32_extattr_get_fd(int fd, \
+ int attrnamespace, const netbsd32_charp attrname, \
+ netbsd32_voidp data, netbsd32_size_t nbytes); }
+366 STD { int netbsd32_extattr_delete_fd(int fd, \
+ int attrnamespace, const netbsd32_charp attrname); }
+367 STD { int netbsd32_extattr_set_link(const netbsd32_charp path, \
+ int attrnamespace, const netbsd32_charp attrname, \
+ const netbsd32_voidp data, netbsd32_size_t nbytes); }
+368 STD { int netbsd32_extattr_get_link(const netbsd32_charp path, \
Home |
Main Index |
Thread Index |
Old Index