Now as twrite() is using a declarative approach, simplify the
code of callers of this function.
Signed-off-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
Message-Id: <
7f280ec6a1f9d8afed46567a796562c4dc28afa9.
1664917004.git.qemu_oss@crudebyte.com>
char *wnames[] = { g_strdup(QTEST_V9FS_SYNTH_WRITE_FILE) };
g_autofree char *buf = g_malloc0(write_count);
uint32_t count;
char *wnames[] = { g_strdup(QTEST_V9FS_SYNTH_WRITE_FILE) };
g_autofree char *buf = g_malloc0(write_count);
uint32_t count;
tattach({ .client = v9p });
twalk({
tattach({ .client = v9p });
twalk({
tlopen({ .client = v9p, .fid = 1, .flags = O_WRONLY });
tlopen({ .client = v9p, .fid = 1, .flags = O_WRONLY });
.client = v9p, .fid = 1, .offset = 0, .count = write_count,
.client = v9p, .fid = 1, .offset = 0, .count = write_count,
- .data = buf, .requestOnly = true
- }).req;
- v9fs_req_wait_for_reply(req, NULL);
- v9fs_rwrite(req, &count);
+ .data = buf
+ }).count;
g_assert_cmpint(count, ==, write_count);
g_free(wnames[0]);
g_assert_cmpint(count, ==, write_count);
g_free(wnames[0]);