aboutsummaryrefslogtreecommitdiff
path: root/hw/9pfs/virtio-9p-xattr.c
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2011-06-08 12:15:43 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2011-06-08 12:15:43 -0500
commit93e0597ef9fa266756c30e61fafe4b70fc7ce6a6 (patch)
treeb1dcd7925329853ac5284bc2c12ebecdfa44fa34 /hw/9pfs/virtio-9p-xattr.c
parentac779fe2334ebea5d4a365b053d786f7748a1db5 (diff)
parent5c3234c6c037943bd4c2d643a1b8cc35f563dbdb (diff)
downloadqemu-93e0597ef9fa266756c30e61fafe4b70fc7ce6a6.zip
qemu-93e0597ef9fa266756c30e61fafe4b70fc7ce6a6.tar.gz
qemu-93e0597ef9fa266756c30e61fafe4b70fc7ce6a6.tar.bz2
Merge remote-tracking branch 'jvrao/for-anthony' into staging
Diffstat (limited to 'hw/9pfs/virtio-9p-xattr.c')
-rw-r--r--hw/9pfs/virtio-9p-xattr.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/hw/9pfs/virtio-9p-xattr.c b/hw/9pfs/virtio-9p-xattr.c
index 03c3d3f..bde0b7f 100644
--- a/hw/9pfs/virtio-9p-xattr.c
+++ b/hw/9pfs/virtio-9p-xattr.c
@@ -11,7 +11,7 @@
*
*/
-#include "virtio.h"
+#include "hw/virtio.h"
#include "virtio-9p.h"
#include "fsdev/file-op-9p.h"
#include "virtio-9p-xattr.h"
@@ -66,20 +66,21 @@ ssize_t v9fs_list_xattr(FsContext *ctx, const char *path,
void *value, size_t vsize)
{
ssize_t size = 0;
+ char buffer[PATH_MAX];
void *ovalue = value;
XattrOperations *xops;
char *orig_value, *orig_value_start;
ssize_t xattr_len, parsed_len = 0, attr_len;
/* Get the actual len */
- xattr_len = llistxattr(rpath(ctx, path), value, 0);
+ xattr_len = llistxattr(rpath(ctx, path, buffer), value, 0);
if (xattr_len <= 0) {
return xattr_len;
}
/* Now fetch the xattr and find the actual size */
orig_value = qemu_malloc(xattr_len);
- xattr_len = llistxattr(rpath(ctx, path), orig_value, xattr_len);
+ xattr_len = llistxattr(rpath(ctx, path, buffer), orig_value, xattr_len);
/* store the orig pointer */
orig_value_start = orig_value;