From: Greg Kurz <groug@kaod.org>
To: qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>, Greg Kurz <groug@kaod.org>
Subject: [Qemu-devel] [PULL 04/12] 9pfs: fix some type definitions
Date: Sat, 6 Jan 2018 02:07:31 +0100 [thread overview]
Message-ID: <20180106010739.18201-5-groug@kaod.org> (raw)
In-Reply-To: <20180106010739.18201-1-groug@kaod.org>
To comply with the QEMU coding style.
Signed-off-by: Greg Kurz <groug@kaod.org>
---
hw/9pfs/9p.c | 6 +++---
hw/9pfs/9p.h | 12 ++++++------
hw/9pfs/virtio-9p-device.c | 2 +-
hw/9pfs/xen-9p-backend.c | 2 +-
4 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c
index 52d46632fe15..76f90f2b7863 100644
--- a/hw/9pfs/9p.c
+++ b/hw/9pfs/9p.c
@@ -99,10 +99,10 @@ static int omode_to_uflags(int8_t mode)
return ret;
}
-struct dotl_openflag_map {
+typedef struct DotlOpenflagMap {
int dotl_flag;
int open_flag;
-};
+} DotlOpenflagMap;
static int dotl_to_open_flags(int flags)
{
@@ -113,7 +113,7 @@ static int dotl_to_open_flags(int flags)
*/
int oflags = flags & O_ACCMODE;
- struct dotl_openflag_map dotl_oflag_map[] = {
+ DotlOpenflagMap dotl_oflag_map[] = {
{ P9_DOTL_CREATE, O_CREAT },
{ P9_DOTL_EXCL, O_EXCL },
{ P9_DOTL_NOCTTY , O_NOCTTY },
diff --git a/hw/9pfs/9p.h b/hw/9pfs/9p.h
index cdfc4f4ce787..6e3b48391788 100644
--- a/hw/9pfs/9p.h
+++ b/hw/9pfs/9p.h
@@ -94,10 +94,10 @@ enum {
P9_QTFILE = 0x00,
};
-enum p9_proto_version {
+typedef enum P9ProtoVersion {
V9FS_PROTO_2000U = 0x01,
V9FS_PROTO_2000L = 0x02,
-};
+} P9ProtoVersion;
#define P9_NOTAG UINT16_MAX
#define P9_NOFID UINT32_MAX
@@ -118,6 +118,7 @@ static inline char *rpath(FsContext *ctx, const char *path)
typedef struct V9fsPDU V9fsPDU;
typedef struct V9fsState V9fsState;
+typedef struct V9fsTransport V9fsTransport;
typedef struct {
uint32_t size_le;
@@ -238,10 +239,10 @@ struct V9fsState
FileOperations *ops;
FsContext ctx;
char *tag;
- enum p9_proto_version proto_version;
+ P9ProtoVersion proto_version;
int32_t msize;
V9fsPDU pdus[MAX_REQ];
- const struct V9fsTransport *transport;
+ const V9fsTransport *transport;
/*
* lock ensuring atomic path update
* on rename.
@@ -367,8 +368,7 @@ struct V9fsTransport {
void (*push_and_notify)(V9fsPDU *pdu);
};
-static inline int v9fs_register_transport(V9fsState *s,
- const struct V9fsTransport *t)
+static inline int v9fs_register_transport(V9fsState *s, const V9fsTransport *t)
{
assert(!s->transport);
s->transport = t;
diff --git a/hw/9pfs/virtio-9p-device.c b/hw/9pfs/virtio-9p-device.c
index c3ae7de3a2d5..43f4e53f336f 100644
--- a/hw/9pfs/virtio-9p-device.c
+++ b/hw/9pfs/virtio-9p-device.c
@@ -184,7 +184,7 @@ static void virtio_init_out_iov_from_pdu(V9fsPDU *pdu, struct iovec **piov,
*pniov = elem->out_num;
}
-static const struct V9fsTransport virtio_9p_transport = {
+static const V9fsTransport virtio_9p_transport = {
.pdu_vmarshal = virtio_pdu_vmarshal,
.pdu_vunmarshal = virtio_pdu_vunmarshal,
.init_in_iov_from_pdu = virtio_init_in_iov_from_pdu,
diff --git a/hw/9pfs/xen-9p-backend.c b/hw/9pfs/xen-9p-backend.c
index ee87f08926a2..df2a4100bf55 100644
--- a/hw/9pfs/xen-9p-backend.c
+++ b/hw/9pfs/xen-9p-backend.c
@@ -233,7 +233,7 @@ static void xen_9pfs_push_and_notify(V9fsPDU *pdu)
qemu_bh_schedule(ring->bh);
}
-static const struct V9fsTransport xen_9p_transport = {
+static const V9fsTransport xen_9p_transport = {
.pdu_vmarshal = xen_9pfs_pdu_vmarshal,
.pdu_vunmarshal = xen_9pfs_pdu_vunmarshal,
.init_in_iov_from_pdu = xen_9pfs_init_in_iov_from_pdu,
--
2.13.6
next prev parent reply other threads:[~2018-01-06 1:08 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-06 1:07 [Qemu-devel] [PULL 00/12] 9p patches for 2.12 20170106 Greg Kurz
2018-01-06 1:07 ` [Qemu-devel] [PULL 01/12] virtio-9p: move unrealize/realize after virtio_9p_transport definition Greg Kurz
2018-01-06 1:07 ` [Qemu-devel] [PULL 02/12] 9pfs: fix XattrOperations typedef Greg Kurz
2018-01-06 1:07 ` [Qemu-devel] [PULL 03/12] fsdev: fix some type definitions Greg Kurz
2018-01-06 1:07 ` Greg Kurz [this message]
2018-01-06 1:07 ` [Qemu-devel] [PULL 05/12] 9pfs: handle: fix type definition Greg Kurz
2018-01-06 1:07 ` [Qemu-devel] [PULL 06/12] 9pfs: fix type in *_parse_opts declarations Greg Kurz
2018-01-06 1:07 ` [Qemu-devel] [PULL 07/12] 9pfs: fix error path in pdu_submit() Greg Kurz
2018-01-06 1:07 ` [Qemu-devel] [PULL 08/12] 9pfs: make pdu_marshal() and pdu_unmarshal() static functions Greg Kurz
2018-01-06 1:07 ` [Qemu-devel] [PULL 09/12] tests: virtio-9p: fix ISR dependence Greg Kurz
2018-01-06 1:07 ` [Qemu-devel] [PULL 10/12] tests: virtio-9p: set DRIVER_OK before using the device Greg Kurz
2018-01-06 1:07 ` [Qemu-devel] [PULL 11/12] fsdev: improve error handling of backend opts parsing Greg Kurz
2018-01-06 1:07 ` [Qemu-devel] [PULL 12/12] fsdev: improve error handling of backend init Greg Kurz
2018-01-06 1:22 ` [Qemu-devel] [PULL 00/12] 9p patches for 2.12 20170106 no-reply
2018-01-08 8:07 ` Greg Kurz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180106010739.18201-5-groug@kaod.org \
--to=groug@kaod.org \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).