summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorDale Rahn <drahn@cvs.openbsd.org>2002-02-22 20:55:29 +0000
committerDale Rahn <drahn@cvs.openbsd.org>2002-02-22 20:55:29 +0000
commit0e29999ecbd23c3d28b387738fdc44c06ad62dc7 (patch)
tree9ec29d5dde85b292d85d0342d8f9d7e188ca2679 /sys
parented874c54b82ac4b26457f13e640e6dff76f2bf8c (diff)
EA sync
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/init_sysent.c35
-rw-r--r--sys/kern/syscalls.c21
-rw-r--r--sys/kern/vnode_if.c76
-rw-r--r--sys/sys/syscall.h27
-rw-r--r--sys/sys/syscallargs.h66
-rw-r--r--sys/sys/vnode_if.h29
6 files changed, 243 insertions, 11 deletions
diff --git a/sys/kern/init_sysent.c b/sys/kern/init_sysent.c
index c5353453a4f..b6bbe518fd2 100644
--- a/sys/kern/init_sysent.c
+++ b/sys/kern/init_sysent.c
@@ -1,10 +1,10 @@
-/* $OpenBSD: init_sysent.c,v 1.54 2001/08/26 04:11:12 deraadt Exp $ */
+/* $OpenBSD: init_sysent.c,v 1.55 2002/02/22 20:55:28 drahn Exp $ */
/*
* System call switch table.
*
* DO NOT EDIT-- this file is automatically generated.
- * created from; OpenBSD: syscalls.master,v 1.47 2001/06/26 19:56:52 dugsong Exp
+ * created from; OpenBSD: syscalls.master,v 1.48 2002/02/22 20:37:45 drahn Exp
*/
#include <sys/param.h>
@@ -709,5 +709,36 @@ struct sysent sysent[] = {
sys_munlockall }, /* 272 = munlockall */
{ 3, s(struct sys_getpeereid_args),
sys_getpeereid }, /* 273 = getpeereid */
+#ifdef UFS_EXTATTR
+ { 5, s(struct sys_extattrctl_args),
+ sys_extattrctl }, /* 274 = extattrctl */
+ { 5, s(struct sys_extattr_set_file_args),
+ sys_extattr_set_file }, /* 275 = extattr_set_file */
+ { 5, s(struct sys_extattr_get_file_args),
+ sys_extattr_get_file }, /* 276 = extattr_get_file */
+ { 3, s(struct sys_extattr_delete_file_args),
+ sys_extattr_delete_file }, /* 277 = extattr_delete_file */
+ { 5, s(struct sys_extattr_set_fd_args),
+ sys_extattr_set_fd }, /* 278 = extattr_set_fd */
+ { 5, s(struct sys_extattr_get_fd_args),
+ sys_extattr_get_fd }, /* 279 = extattr_get_fd */
+ { 3, s(struct sys_extattr_delete_fd_args),
+ sys_extattr_delete_fd }, /* 280 = extattr_delete_fd */
+#else
+ { 0, 0,
+ sys_nosys }, /* 274 = unimplemented sys_extattrctl */
+ { 0, 0,
+ sys_nosys }, /* 275 = unimplemented sys_extattr_set_file */
+ { 0, 0,
+ sys_nosys }, /* 276 = unimplemented sys_extattr_get_file */
+ { 0, 0,
+ sys_nosys }, /* 277 = unimplemented sys_extattr_delete_file */
+ { 0, 0,
+ sys_nosys }, /* 278 = unimplemented sys_extattr_set_fd */
+ { 0, 0,
+ sys_nosys }, /* 279 = unimplemented sys_extattr_get_fd */
+ { 0, 0,
+ sys_nosys }, /* 280 = unimplemented sys_extattr_delete_fd */
+#endif
};
diff --git a/sys/kern/syscalls.c b/sys/kern/syscalls.c
index 8f02afc9226..3cc4cb17b3c 100644
--- a/sys/kern/syscalls.c
+++ b/sys/kern/syscalls.c
@@ -1,10 +1,10 @@
-/* $OpenBSD: syscalls.c,v 1.54 2001/08/26 04:11:12 deraadt Exp $ */
+/* $OpenBSD: syscalls.c,v 1.55 2002/02/22 20:55:28 drahn Exp $ */
/*
* System call names.
*
* DO NOT EDIT-- this file is automatically generated.
- * created from; OpenBSD: syscalls.master,v 1.47 2001/06/26 19:56:52 dugsong Exp
+ * created from; OpenBSD: syscalls.master,v 1.48 2002/02/22 20:37:45 drahn Exp
*/
char *syscallnames[] = {
@@ -360,4 +360,21 @@ char *syscallnames[] = {
"mlockall", /* 271 = mlockall */
"munlockall", /* 272 = munlockall */
"getpeereid", /* 273 = getpeereid */
+#ifdef UFS_EXTATTR
+ "extattrctl", /* 274 = extattrctl */
+ "extattr_set_file", /* 275 = extattr_set_file */
+ "extattr_get_file", /* 276 = extattr_get_file */
+ "extattr_delete_file", /* 277 = extattr_delete_file */
+ "extattr_set_fd", /* 278 = extattr_set_fd */
+ "extattr_get_fd", /* 279 = extattr_get_fd */
+ "extattr_delete_fd", /* 280 = extattr_delete_fd */
+#else
+ "#274 (unimplemented sys_extattrctl)", /* 274 = unimplemented sys_extattrctl */
+ "#275 (unimplemented sys_extattr_set_file)", /* 275 = unimplemented sys_extattr_set_file */
+ "#276 (unimplemented sys_extattr_get_file)", /* 276 = unimplemented sys_extattr_get_file */
+ "#277 (unimplemented sys_extattr_delete_file)", /* 277 = unimplemented sys_extattr_delete_file */
+ "#278 (unimplemented sys_extattr_set_fd)", /* 278 = unimplemented sys_extattr_set_fd */
+ "#279 (unimplemented sys_extattr_get_fd)", /* 279 = unimplemented sys_extattr_get_fd */
+ "#280 (unimplemented sys_extattr_delete_fd)", /* 280 = unimplemented sys_extattr_delete_fd */
+#endif
};
diff --git a/sys/kern/vnode_if.c b/sys/kern/vnode_if.c
index 1f30d85c507..1c762730f66 100644
--- a/sys/kern/vnode_if.c
+++ b/sys/kern/vnode_if.c
@@ -3,7 +3,7 @@
* (Modifications made here may easily be lost!)
*
* Created from the file:
- * OpenBSD: vnode_if.src,v 1.11 2001/06/23 02:21:05 csapuntz Exp
+ * OpenBSD: vnode_if.src,v 1.19 2002/02/22 20:37:45 drahn Exp
* by the script:
* OpenBSD: vnode_if.sh,v 1.8 2001/02/26 17:34:18 art Exp
*/
@@ -1230,6 +1230,78 @@ int VOP_WHITEOUT(dvp, cnp, flags)
return (VCALL(dvp, VOFFSET(vop_whiteout), &a));
}
+int vop_getextattr_vp_offsets[] = {
+ VOPARG_OFFSETOF(struct vop_getextattr_args,a_vp),
+ VDESC_NO_OFFSET
+};
+struct vnodeop_desc vop_getextattr_desc = {
+ 0,
+ "vop_getextattr",
+ 0,
+ vop_getextattr_vp_offsets,
+ VDESC_NO_OFFSET,
+ VOPARG_OFFSETOF(struct vop_getextattr_args, a_cred),
+ VOPARG_OFFSETOF(struct vop_getextattr_args, a_p),
+ VDESC_NO_OFFSET,
+ NULL,
+};
+
+int VOP_GETEXTATTR(vp, attrnamespace, name, uio, size, cred, p)
+ struct vnode *vp;
+ int attrnamespace;
+ const char *name;
+ struct uio *uio;
+ size_t *size;
+ struct ucred *cred;
+ struct proc *p;
+{
+ struct vop_getextattr_args a;
+ a.a_desc = VDESC(vop_getextattr);
+ a.a_vp = vp;
+ a.a_attrnamespace = attrnamespace;
+ a.a_name = name;
+ a.a_uio = uio;
+ a.a_size = size;
+ a.a_cred = cred;
+ a.a_p = p;
+ return (VCALL(vp, VOFFSET(vop_getextattr), &a));
+}
+
+int vop_setextattr_vp_offsets[] = {
+ VOPARG_OFFSETOF(struct vop_setextattr_args,a_vp),
+ VDESC_NO_OFFSET
+};
+struct vnodeop_desc vop_setextattr_desc = {
+ 0,
+ "vop_setextattr",
+ 0,
+ vop_setextattr_vp_offsets,
+ VDESC_NO_OFFSET,
+ VOPARG_OFFSETOF(struct vop_setextattr_args, a_cred),
+ VOPARG_OFFSETOF(struct vop_setextattr_args, a_p),
+ VDESC_NO_OFFSET,
+ NULL,
+};
+
+int VOP_SETEXTATTR(vp, attrnamespace, name, uio, cred, p)
+ struct vnode *vp;
+ int attrnamespace;
+ const char *name;
+ struct uio *uio;
+ struct ucred *cred;
+ struct proc *p;
+{
+ struct vop_setextattr_args a;
+ a.a_desc = VDESC(vop_setextattr);
+ a.a_vp = vp;
+ a.a_attrnamespace = attrnamespace;
+ a.a_name = name;
+ a.a_uio = uio;
+ a.a_cred = cred;
+ a.a_p = p;
+ return (VCALL(vp, VOFFSET(vop_setextattr), &a));
+}
+
/* Special cases: */
int vop_strategy_vp_offsets[] = {
@@ -1323,6 +1395,8 @@ struct vnodeop_desc *vfs_op_descs[] = {
&vop_advlock_desc,
&vop_reallocblks_desc,
&vop_whiteout_desc,
+ &vop_getextattr_desc,
+ &vop_setextattr_desc,
NULL
};
diff --git a/sys/sys/syscall.h b/sys/sys/syscall.h
index 06a0e8e1692..204569fff6a 100644
--- a/sys/sys/syscall.h
+++ b/sys/sys/syscall.h
@@ -1,10 +1,10 @@
-/* $OpenBSD: syscall.h,v 1.53 2001/08/26 04:11:12 deraadt Exp $ */
+/* $OpenBSD: syscall.h,v 1.54 2002/02/22 20:55:28 drahn Exp $ */
/*
* System call numbers.
*
* DO NOT EDIT-- this file is automatically generated.
- * created from; OpenBSD: syscalls.master,v 1.47 2001/06/26 19:56:52 dugsong Exp
+ * created from; OpenBSD: syscalls.master,v 1.48 2002/02/22 20:37:45 drahn Exp
*/
/* syscall: "syscall" ret: "int" args: "int" "..." */
@@ -639,4 +639,25 @@
/* syscall: "getpeereid" ret: "int" args: "int" "uid_t *" "gid_t *" */
#define SYS_getpeereid 273
-#define SYS_MAXSYSCALL 274
+/* syscall: "extattrctl" ret: "int" args: "const char *" "int" "const char *" "int" "const char *" */
+#define SYS_extattrctl 274
+
+/* syscall: "extattr_set_file" ret: "int" args: "const char *" "int" "const char *" "void *" "size_t" */
+#define SYS_extattr_set_file 275
+
+/* syscall: "extattr_get_file" ret: "ssize_t" args: "const char *" "int" "const char *" "void *" "size_t" */
+#define SYS_extattr_get_file 276
+
+/* syscall: "extattr_delete_file" ret: "int" args: "const char *" "int" "const char *" */
+#define SYS_extattr_delete_file 277
+
+/* syscall: "extattr_set_fd" ret: "int" args: "int" "int" "const char *" "void *" "size_t" */
+#define SYS_extattr_set_fd 278
+
+/* syscall: "extattr_get_fd" ret: "ssize_t" args: "int" "int" "const char *" "void *" "size_t" */
+#define SYS_extattr_get_fd 279
+
+/* syscall: "extattr_delete_fd" ret: "int" args: "int" "int" "const char *" */
+#define SYS_extattr_delete_fd 280
+
+#define SYS_MAXSYSCALL 281
diff --git a/sys/sys/syscallargs.h b/sys/sys/syscallargs.h
index b401c8293e4..60bd4fbf186 100644
--- a/sys/sys/syscallargs.h
+++ b/sys/sys/syscallargs.h
@@ -1,10 +1,10 @@
-/* $OpenBSD: syscallargs.h,v 1.54 2001/08/26 04:11:12 deraadt Exp $ */
+/* $OpenBSD: syscallargs.h,v 1.55 2002/02/22 20:55:28 drahn Exp $ */
/*
* System call argument lists.
*
* DO NOT EDIT-- this file is automatically generated.
- * created from; OpenBSD: syscalls.master,v 1.47 2001/06/26 19:56:52 dugsong Exp
+ * created from; OpenBSD: syscalls.master,v 1.48 2002/02/22 20:37:45 drahn Exp
*/
#ifdef syscallarg
@@ -1135,6 +1135,58 @@ struct sys_getpeereid_args {
syscallarg(gid_t *) egid;
};
+struct sys_extattrctl_args {
+ syscallarg(const char *) path;
+ syscallarg(int) cmd;
+ syscallarg(const char *) filename;
+ syscallarg(int) attrnamespace;
+ syscallarg(const char *) attrname;
+};
+
+struct sys_extattr_set_file_args {
+ syscallarg(const char *) path;
+ syscallarg(int) attrnamespace;
+ syscallarg(const char *) attrname;
+ syscallarg(void *) data;
+ syscallarg(size_t) nbytes;
+};
+
+struct sys_extattr_get_file_args {
+ syscallarg(const char *) path;
+ syscallarg(int) attrnamespace;
+ syscallarg(const char *) attrname;
+ syscallarg(void *) data;
+ syscallarg(size_t) nbytes;
+};
+
+struct sys_extattr_delete_file_args {
+ syscallarg(const char *) path;
+ syscallarg(int) attrnamespace;
+ syscallarg(const char *) attrname;
+};
+
+struct sys_extattr_set_fd_args {
+ syscallarg(int) fd;
+ syscallarg(int) attrnamespace;
+ syscallarg(const char *) attrname;
+ syscallarg(void *) data;
+ syscallarg(size_t) nbytes;
+};
+
+struct sys_extattr_get_fd_args {
+ syscallarg(int) fd;
+ syscallarg(int) attrnamespace;
+ syscallarg(const char *) attrname;
+ syscallarg(void *) data;
+ syscallarg(size_t) nbytes;
+};
+
+struct sys_extattr_delete_fd_args {
+ syscallarg(int) fd;
+ syscallarg(int) attrnamespace;
+ syscallarg(const char *) attrname;
+};
+
/*
* System call prototypes.
*/
@@ -1412,3 +1464,13 @@ int sys_kevent __P((struct proc *, void *, register_t *));
int sys_mlockall __P((struct proc *, void *, register_t *));
int sys_munlockall __P((struct proc *, void *, register_t *));
int sys_getpeereid __P((struct proc *, void *, register_t *));
+#ifdef UFS_EXTATTR
+int sys_extattrctl __P((struct proc *, void *, register_t *));
+int sys_extattr_set_file __P((struct proc *, void *, register_t *));
+int sys_extattr_get_file __P((struct proc *, void *, register_t *));
+int sys_extattr_delete_file __P((struct proc *, void *, register_t *));
+int sys_extattr_set_fd __P((struct proc *, void *, register_t *));
+int sys_extattr_get_fd __P((struct proc *, void *, register_t *));
+int sys_extattr_delete_fd __P((struct proc *, void *, register_t *));
+#else
+#endif
diff --git a/sys/sys/vnode_if.h b/sys/sys/vnode_if.h
index 00cdadabe25..7d4518ec2a2 100644
--- a/sys/sys/vnode_if.h
+++ b/sys/sys/vnode_if.h
@@ -3,7 +3,7 @@
* (Modifications made here may easily be lost!)
*
* Created from the file:
- * OpenBSD: vnode_if.src,v 1.11 2001/06/23 02:21:05 csapuntz Exp
+ * OpenBSD: vnode_if.src,v 1.19 2002/02/22 20:37:45 drahn Exp
* by the script:
* OpenBSD: vnode_if.sh,v 1.8 2001/02/26 17:34:18 art Exp
*/
@@ -397,6 +397,33 @@ struct vop_whiteout_args {
extern struct vnodeop_desc vop_whiteout_desc;
int VOP_WHITEOUT __P((struct vnode *, struct componentname *, int));
+struct vop_getextattr_args {
+ struct vnodeop_desc *a_desc;
+ struct vnode *a_vp;
+ int a_attrnamespace;
+ const char *a_name;
+ struct uio *a_uio;
+ size_t *a_size;
+ struct ucred *a_cred;
+ struct proc *a_p;
+};
+extern struct vnodeop_desc vop_getextattr_desc;
+int VOP_GETEXTATTR __P((struct vnode *, int, const char *, struct uio *,
+ size_t *, struct ucred *, struct proc *));
+
+struct vop_setextattr_args {
+ struct vnodeop_desc *a_desc;
+ struct vnode *a_vp;
+ int a_attrnamespace;
+ const char *a_name;
+ struct uio *a_uio;
+ struct ucred *a_cred;
+ struct proc *a_p;
+};
+extern struct vnodeop_desc vop_setextattr_desc;
+int VOP_SETEXTATTR __P((struct vnode *, int, const char *, struct uio *,
+ struct ucred *, struct proc *));
+
/* Special cases: */
#include <sys/buf.h>