aboutsummaryrefslogtreecommitdiff
path: root/hw/9pfs/virtio-9p.h
diff options
context:
space:
mode:
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>2011-09-09 15:14:18 +0530
committerAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>2011-09-22 21:38:52 +0530
commit2289be19aecc290263ef1f3c1f4a0e9ea32aaad6 (patch)
treef9049e0b36dce4289995e8d3519b20255c4a4b7f /hw/9pfs/virtio-9p.h
parent02cb7f3a256517cbf3136caff2863fbafc57b540 (diff)
hw/9pfs: Move fid pathname tracking to seperate data type.
This enables us to add handles to track fids later. The V9fsPath added is similar to V9fsString except that the size include the NULL byte also. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Diffstat (limited to 'hw/9pfs/virtio-9p.h')
-rw-r--r--hw/9pfs/virtio-9p.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/hw/9pfs/virtio-9p.h b/hw/9pfs/virtio-9p.h
index 4238a76136..8c7c3f0571 100644
--- a/hw/9pfs/virtio-9p.h
+++ b/hw/9pfs/virtio-9p.h
@@ -206,7 +206,7 @@ struct V9fsFidState
{
int fid_type;
int32_t fid;
- V9fsString path;
+ V9fsPath path;
union {
int fd;
DIR *dir;
@@ -396,4 +396,9 @@ extern void v9fs_string_free(V9fsString *str);
extern void v9fs_string_null(V9fsString *str);
extern void v9fs_string_sprintf(V9fsString *str, const char *fmt, ...);
extern void v9fs_string_copy(V9fsString *lhs, V9fsString *rhs);
+extern void v9fs_path_init(V9fsPath *path);
+extern void v9fs_path_free(V9fsPath *path);
+extern void v9fs_path_copy(V9fsPath *lhs, V9fsPath *rhs);
+extern int v9fs_name_to_path(V9fsState *s, V9fsPath *dirpath,
+ const char *name, V9fsPath *path);
#endif