Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/rump/librump/rumpvfs Support VOP_SETATTR, otherwise e.g....
details: https://anonhg.NetBSD.org/src/rev/99f7d719c207
branches: trunk
changeset: 758962:99f7d719c207
user: pooka <pooka%NetBSD.org@localhost>
date: Mon Nov 22 15:15:35 2010 +0000
description:
Support VOP_SETATTR, otherwise e.g. open(O_TRUNC) fails.
diffstat:
sys/rump/librump/rumpvfs/rumpfs.c | 21 +++++++++++++++++++--
1 files changed, 19 insertions(+), 2 deletions(-)
diffs (63 lines):
diff -r 787de58687f4 -r 99f7d719c207 sys/rump/librump/rumpvfs/rumpfs.c
--- a/sys/rump/librump/rumpvfs/rumpfs.c Mon Nov 22 13:45:26 2010 +0000
+++ b/sys/rump/librump/rumpvfs/rumpfs.c Mon Nov 22 15:15:35 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rumpfs.c,v 1.73 2010/11/11 18:45:09 pooka Exp $ */
+/* $NetBSD: rumpfs.c,v 1.74 2010/11/22 15:15:35 pooka Exp $ */
/*
* Copyright (c) 2009, 2010 Antti Kantee. All Rights Reserved.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rumpfs.c,v 1.73 2010/11/11 18:45:09 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rumpfs.c,v 1.74 2010/11/22 15:15:35 pooka Exp $");
#include <sys/param.h>
#include <sys/atomic.h>
@@ -62,6 +62,7 @@
static int rump_vop_lookup(void *);
static int rump_vop_getattr(void *);
+static int rump_vop_setattr(void *);
static int rump_vop_mkdir(void *);
static int rump_vop_rmdir(void *);
static int rump_vop_remove(void *);
@@ -95,6 +96,7 @@
{ &vop_default_desc, vn_default_error },
{ &vop_lookup_desc, rump_vop_lookup },
{ &vop_getattr_desc, rump_vop_getattr },
+ { &vop_setattr_desc, rump_vop_setattr },
{ &vop_mkdir_desc, rump_vop_mkdir },
{ &vop_rmdir_desc, rump_vop_rmdir },
{ &vop_remove_desc, rump_vop_remove },
@@ -757,6 +759,20 @@
}
static int
+rump_vop_setattr(void *v)
+{
+ struct vop_getattr_args /* {
+ struct vnode *a_vp;
+ struct vattr *a_vap;
+ kauth_cred_t a_cred;
+ } */ *ap = v;
+ struct rumpfs_node *rn = ap->a_vp->v_data;
+
+ memcpy(&rn->rn_va, ap->a_vap, sizeof(struct vattr));
+ return 0;
+}
+
+static int
rump_vop_mkdir(void *v)
{
struct vop_mkdir_args /* {
@@ -1421,6 +1437,7 @@
switch (ap->a_desc->vdesc_offset) {
case VOP_ACCESS_DESCOFFSET:
case VOP_GETATTR_DESCOFFSET:
+ case VOP_SETATTR_DESCOFFSET:
case VOP_LOCK_DESCOFFSET:
case VOP_UNLOCK_DESCOFFSET:
case VOP_RECLAIM_DESCOFFSET:
Home |
Main Index |
Thread Index |
Old Index