summaryrefslogtreecommitdiffstats
path: root/hw/9pfs/coxattr.c
diff options
context:
space:
mode:
authorAnthony Liguori2011-08-25 14:48:15 +0200
committerAnthony Liguori2011-08-25 14:48:15 +0200
commit444dc48298c480e42e15a8fe676be737d8a6b2a1 (patch)
treebc76c5afaa746c8c27d0457e2035fe38ee45fb6c /hw/9pfs/coxattr.c
parentppc_oldworld, ppc_newworld: fix escc BAR related crash (diff)
parentuse readdir_r instead of readdir for reentrancy (diff)
downloadqemu-444dc48298c480e42e15a8fe676be737d8a6b2a1.tar.gz
qemu-444dc48298c480e42e15a8fe676be737d8a6b2a1.tar.xz
qemu-444dc48298c480e42e15a8fe676be737d8a6b2a1.zip
Merge remote-tracking branch 'aneesh/for-upstream-2' into staging
Diffstat (limited to 'hw/9pfs/coxattr.c')
-rw-r--r--hw/9pfs/coxattr.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/hw/9pfs/coxattr.c b/hw/9pfs/coxattr.c
index 2fba2c98c2..a289389e49 100644
--- a/hw/9pfs/coxattr.c
+++ b/hw/9pfs/coxattr.c
@@ -48,3 +48,37 @@ int v9fs_co_lgetxattr(V9fsState *s, V9fsString *path,
});
return err;
}
+
+int v9fs_co_lsetxattr(V9fsState *s, V9fsString *path,
+ V9fsString *xattr_name, void *value,
+ size_t size, int flags)
+{
+ int err;
+
+ v9fs_co_run_in_worker(
+ {
+ err = s->ops->lsetxattr(&s->ctx, path->data,
+ xattr_name->data, value,
+ size, flags);
+ if (err < 0) {
+ err = -errno;
+ }
+ });
+ return err;
+}
+
+int v9fs_co_lremovexattr(V9fsState *s, V9fsString *path,
+ V9fsString *xattr_name)
+{
+ int err;
+
+ v9fs_co_run_in_worker(
+ {
+ err = s->ops->lremovexattr(&s->ctx, path->data,
+ xattr_name->data);
+ if (err < 0) {
+ err = -errno;
+ }
+ });
+ return err;
+}