diff options
author | Greg Kurz <groug@kaod.org> | 2020-10-20 18:09:41 +0200 |
---|---|---|
committer | Christian Schoenebeck <qemu_oss@crudebyte.com> | 2020-11-01 19:44:29 +0100 |
commit | c1934f630c131ec487d21949c9b53e1e3f2b8bcb (patch) | |
tree | 748b6c0c30b39a99bea9e477e5a0022beddcffcd /tests/qtest/virtio-9p-test.c | |
parent | 1d98613d7cd488528bc08260185c03ee078c1347 (diff) | |
download | qemu-c1934f630c131ec487d21949c9b53e1e3f2b8bcb.zip qemu-c1934f630c131ec487d21949c9b53e1e3f2b8bcb.tar.gz qemu-c1934f630c131ec487d21949c9b53e1e3f2b8bcb.tar.bz2 |
tests/9pfs: Turn fs_mkdir() into a helper
fs_mkdir() isn't a top level test function and thus shouldn't take
the "void *obj, void *data, QGuestAllocator *t_alloc" arguments.
Turn it into a helper to be used by test functions.
Signed-off-by: Greg Kurz <groug@kaod.org>
Message-Id: <160321018148.266767.15959608711038504029.stgit@bahia.lan>
Signed-off-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
Diffstat (limited to 'tests/qtest/virtio-9p-test.c')
-rw-r--r-- | tests/qtest/virtio-9p-test.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/tests/qtest/virtio-9p-test.c b/tests/qtest/virtio-9p-test.c index 734b4bc..6f8c46a 100644 --- a/tests/qtest/virtio-9p-test.c +++ b/tests/qtest/virtio-9p-test.c @@ -972,11 +972,8 @@ static void fs_flush_ignored(void *obj, void *data, QGuestAllocator *t_alloc) g_free(wnames[0]); } -static void fs_mkdir(void *obj, void *data, QGuestAllocator *t_alloc, - const char *path, const char *cname) +static void do_mkdir(QVirtio9P *v9p, const char *path, const char *cname) { - QVirtio9P *v9p = obj; - alloc = t_alloc; char **wnames; char *const name = g_strdup(cname); P9Req *req; @@ -1031,7 +1028,7 @@ static void fs_create_dir(void *obj, void *data, QGuestAllocator *t_alloc) g_assert(root_path != NULL); do_attach(v9p); - fs_mkdir(v9p, data, t_alloc, "/", "01"); + do_mkdir(v9p, "/", "01"); /* check if created directory really exists now ... */ g_assert(stat(new_dir, &st) == 0); |