[PATCH 3/5] 9p: introduce p9_client_get_req

From: Stefano Stabellini
Date: Thu Dec 08 2016 - 15:59:56 EST


Introduce a simple helper function to only prepare a p9 client request,
without any waiting involved.

Currently not utilized, but it will be used by a later patch.

Signed-off-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
---
net/9p/client.c | 12 ++++++++++++
1 file changed, 12 insertions(+)

diff --git a/net/9p/client.c b/net/9p/client.c
index bfe1715..eb589ef 100644
--- a/net/9p/client.c
+++ b/net/9p/client.c
@@ -719,6 +719,18 @@ static struct p9_req_t *p9_client_prepare_req(struct p9_client *c,
return ERR_PTR(err);
}

+static struct p9_req_t *
+p9_client_get_req(struct p9_client *c, int8_t type, const char *fmt, ...)
+{
+ va_list ap;
+ struct p9_req_t *req;
+
+ va_start(ap, fmt);
+ req = p9_client_prepare_req(c, type, c->msize, fmt, ap);
+ va_end(ap);
+ return req;
+}
+
/**
* p9_client_rpc - issue a request and wait for a response
* @c: client session
--
1.9.1