9p: cleanup in #include directives
cover 9p: cleanup in #include directives
The recent RFC patch to bring 9p support to Windows hosts unveiled some nits. These two patches are preliminary cleanup.
Michael,
I'd like you to carry these patches in your patchset. Please rebase your current work on top of them.
Thanks.
---
Greg Kurz (2):
9p: don't include <sys/uio.h>
9p: some more cleanup in #include directives
fsdev/9p-iov-marshal.c | 1 - fsdev/9p-marshal.c | 1 - fsdev/file-op-9p.h | 2 +- hw/9pfs/9p-synth.c | 4 +--- hw/9pfs/virtio-9p-device.c | 1 - 5 files changed, 2 insertions(+), 7 deletions(-)
--
Greg
PATCH 1/2 9p: don't include <sys/uio.h>
The <sys/uio.h> system header doesn't exist on all host platforms. Code should include "qemu/osdep.h" instead to avoid build breaks on plafforms that don't define CONFIG_IOVEC (like win32, if it is to support 9p one day).
--- fsdev/9p-iov-marshal.c | 1 - fsdev/9p-marshal.c | 1 - fsdev/file-op-9p.h | 2 +- 3 files changed, 1 insertion(+), 3 deletions(-)
fsdev/9p-iov-marshal.c +0 -1
@@ -15,7 +15,6 @@#include <glib.h> #include <glib/gprintf.h> #include <utime.h> -#include <sys/uio.h> #include "9p-iov-marshal.h" #include "qemu/bswap.h"
fsdev/9p-marshal.c +0 -1
@@ -16,7 +16,6 @@#include <glib/gprintf.h> #include <dirent.h> #include <utime.h> -#include <sys/uio.h> #include "9p-marshal.h"
fsdev/file-op-9p.h +1 -1
@@ -12,9 +12,9 @@*/ #ifndef _FILEOP_H#define _FILEOP_H +#include "qemu/osdep.h" #include <dirent.h> #include <utime.h> -#include <sys/uio.h> #include <sys/vfs.h> #define SM_LOCAL_MODE_BITS 0600
Re: [Qemu-devel] [PATCH for-2.7 1/2] 9p: don't include <sys/uio.h>
Quoted 5 lines · Greg Kurz
The <
sys/uio.h> system header doesn't exist on all host platforms. Code should include "qemu/osdep.h" instead to avoid build breaks on plafforms that don't defineCONFIG_IOVEC(like win32, if it is to support 9p one day).Signed-off-by Greg Kurz <[email protected]>
Quoted 47 lines
--- fsdev/9p-iov-marshal.c | 1 - fsdev/9p-marshal.c | 1 - fsdev/file-op-9p.h | 2 +- 3 files changed, 1 insertion(+), 3 deletions(-)fsdev/9p-iov-marshal.c +0
-1@@ -15,7 +15,6 @@#include <glib.h> #include <glib/gprintf.h> #include <utime.h> -#include <sys/uio.h> #include "9p-iov-marshal.h" #include "qemu/bswap.h" fsdev/9p-marshal.c +0
-1@@ -16,7 +16,6 @@#include <glib/gprintf.h> #include <dirent.h> #include <utime.h> -#include <sys/uio.h> #include "9p-marshal.h" fsdev/file-op-9p.h +1
-1@@ -12,9 +12,9 @@*/ #ifndef _FILEOP_H#define _FILEOP_H +#include "qemu/osdep.h" #include <dirent.h> #include <utime.h> -#include <sys/uio.h> #include <sys/vfs.h> #define SM_LOCAL_MODE_BITS 0600
Michael Fritscher
Acked-byRe: [Qemu-devel] [PATCH for-2.7 1/2] 9p: don't include <sys/uio.h>
Quoted 10 lines · Greg Kurz
Quoted 7 lines
The <
sys/uio.h> system header doesn't exist on all host platforms. Code should
include "qemu/osdep.h" instead to avoid build breaks on plafforms that don't
defineCONFIG_IOVEC(like win32, if it is to support 9p one day).Signed-off-by Greg Kurz <[email protected]>
Yes, I still plan to upstream the win32 9p support in the next weeks, when my stress level goes down a bit ;-)
Best regards,
Michael Fritscher
Quoted 49 lines
Quoted 47 lines
--- fsdev/9p-iov-marshal.c | 1 - fsdev/9p-marshal.c | 1 - fsdev/file-op-9p.h | 2 +- 3 files changed, 1 insertion(+), 3 deletions(-)fsdev/9p-iov-marshal.c +0
-1@@ -15,7 +15,6 @@#include <glib.h> #include <glib/gprintf.h> #include <utime.h> -#include <sys/uio.h> #include "9p-iov-marshal.h" #include "qemu/bswap.h" fsdev/9p-marshal.c +0
-1@@ -16,7 +16,6 @@#include <glib/gprintf.h> #include <dirent.h> #include <utime.h> -#include <sys/uio.h> #include "9p-marshal.h" fsdev/file-op-9p.h +1
-1@@ -12,9 +12,9 @@*/ #ifndef _FILEOP_H#define _FILEOP_H +#include "qemu/osdep.h" #include <dirent.h> #include <utime.h> -#include <sys/uio.h> #include <sys/vfs.h> #define SM_LOCAL_MODE_BITS 0600
Re: [Qemu-devel] [PATCH for-2.7 1/2] 9p: don't include <sys/uio.h>
Quoted 7 lines · On Thu, 30 Jun 2016 14:42:05 +0200 "Michael Fritscher" <[email protected]>…
Quoted 7 lines · Greg Kurz
Quoted 6 lines
The <
sys/uio.h> system header doesn't exist on all host platforms. Code should
include "qemu/osdep.h" instead to avoid build breaks on plafforms that don't
defineCONFIG_IOVEC(like win32, if it is to support 9p one day).
Quoted 8 lines
Quoted 3 lines
Quoted 1 line
Signed-off-by Greg Kurz <[email protected]>Yes, I still plan to upstream the win32 9p support in the next weeks, when my stress level goes down a bit ;-)
Hi Michael !
FYI I'll be on a 1-month leave, starting 25th of July, during which I'm likely to be fully disconnected...
Cheers.
--
Greg
Quoted 54 lines
Best regards,
Michael FritscherQuoted 49 lines
Quoted 47 lines
--- fsdev/9p-iov-marshal.c | 1 - fsdev/9p-marshal.c | 1 - fsdev/file-op-9p.h | 2 +- 3 files changed, 1 insertion(+), 3 deletions(-)fsdev/9p-iov-marshal.c +0
-1@@ -15,7 +15,6 @@#include <glib.h> #include <glib/gprintf.h> #include <utime.h> -#include <sys/uio.h> #include "9p-iov-marshal.h" #include "qemu/bswap.h" fsdev/9p-marshal.c +0
-1@@ -16,7 +16,6 @@#include <glib/gprintf.h> #include <dirent.h> #include <utime.h> -#include <sys/uio.h> #include "9p-marshal.h" fsdev/file-op-9p.h +1
-1@@ -12,9 +12,9 @@*/ #ifndef _FILEOP_H#define _FILEOP_H +#include "qemu/osdep.h" #include <dirent.h> #include <utime.h> -#include <sys/uio.h> #include <sys/vfs.h> #define SM_LOCAL_MODE_BITS 0600
Re: [Qemu-devel] [PATCH for-2.7 1/2] 9p: don't include <sys/uio.h>
In reply to Greg KurzQuoted 40 lines · Greg Kurz
The <
sys/uio.h> system header doesn't exist on all host platforms. Code should include "qemu/osdep.h" instead to avoid build breaks on plafforms that don't defineCONFIG_IOVEC(like win32, if it is to support 9p one day).Signed-off-by Greg Kurz <[email protected]>--- fsdev/9p-iov-marshal.c | 1 - fsdev/9p-marshal.c | 1 - fsdev/file-op-9p.h | 2 +- 3 files changed, 1 insertion(+), 3 deletions(-)fsdev/9p-iov-marshal.c +0
-1@@ -15,7 +15,6 @@#include <glib.h> #include <glib/gprintf.h> #include <utime.h> -#include <sys/uio.h> #include "9p-iov-marshal.h" #include "qemu/bswap.h" fsdev/9p-marshal.c +0
-1@@ -16,7 +16,6 @@#include <glib/gprintf.h> #include <dirent.h> #include <utime.h> -#include <sys/uio.h> #include "9p-marshal.h" fsdev/file-op-9p.h +0
-0
fsdev/file-op-9p.h line 15
Quoted 4 lines
fsdev/file-op-9p.h +1
-0@@ -12,9 +12,9 @@*/ #ifndef _FILEOP_H#define _FILEOP_H +#include "qemu/osdep.h"
Every .c file must include qemu/osdep.h first. You can and should rely on that in headers. Please drop this include.
Quoted 6 lines
fsdev/file-op-9p.h +0
-1#include <dirent.h> #include <utime.h> -#include <sys/uio.h> #include <sys/vfs.h> #define SM_LOCAL_MODE_BITS 0600
Re: [Qemu-devel] [PATCH for-2.7 1/2] 9p: don't include <sys/uio.h>
Quoted 37 lines · On Thu, 30 Jun 2016 14:57:58 +0200 Markus Armbruster <[email protected]> wrote:
Quoted 35 lines · Greg Kurz
The <
sys/uio.h> system header doesn't exist on all host platforms. Code should include "qemu/osdep.h" instead to avoid build breaks on plafforms that don't defineCONFIG_IOVEC(like win32, if it is to support 9p one day).Signed-off-by Greg Kurz <[email protected]>--- fsdev/9p-iov-marshal.c | 1 - fsdev/9p-marshal.c | 1 - fsdev/file-op-9p.h | 2 +- 3 files changed, 1 insertion(+), 3 deletions(-)fsdev/9p-iov-marshal.c +0
-1@@ -15,7 +15,6 @@#include <glib.h> #include <glib/gprintf.h> #include <utime.h> -#include <sys/uio.h> #include "9p-iov-marshal.h" #include "qemu/bswap.h" fsdev/9p-marshal.c +0
-1@@ -16,7 +16,6 @@#include <glib/gprintf.h> #include <dirent.h> #include <utime.h> -#include <sys/uio.h> #include "9p-marshal.h"
Quoted 13 lines
fsdev/file-op-9p.h line 15
Quoted 9 lines
fsdev/file-op-9p.h +1
-0@@ -12,9 +12,9 @@*/ #ifndef _FILEOP_H#define _FILEOP_H +#include "qemu/osdep.h" Every .c file must include
qemu/osdep.hfirst. You can and should rely on that in headers. Please drop this include.
Yeah I discovered that recently... I'll drop this include a fix .c files that need it.
Thanks !
--
Greg
Quoted 7 lines
Quoted 6 lines
fsdev/file-op-9p.h +0
-1#include <dirent.h> #include <utime.h> -#include <sys/uio.h> #include <sys/vfs.h> #define SM_LOCAL_MODE_BITS 0600
PATCH 2/2 9p: some more cleanup in #include directives
In reply to Greg KurzThe "9p-attr.h" header isn't needed by 9p synth and virtio 9p.
While here, also drop last references to virtio from 9p synth since it is now transport agnostic code.
--- hw/9pfs/9p-synth.c | 4 +--- hw/9pfs/virtio-9p-device.c | 1 - 2 files changed, 1 insertion(+), 4 deletions(-)
hw/9pfs/9p-synth.c +1 -3
@@ -1,5 +1,5 @@/* -* Virtio 9p synthetic file system support +* 9p synthetic file system support * * Copyright IBM, Corp. 2011 *
@@ -13,9 +13,7 @@*/ #include "qemu/osdep.h" -#include "hw/virtio/virtio.h" #include "9p.h" -#include "9p-xattr.h" #include "fsdev/qemu-fsdev.h" #include "9p-synth.h" #include "qemu/rcu.h"
hw/9pfs/virtio-9p-device.c +0 -1
@@ -17,7 +17,6 @@#include "qemu/sockets.h" #include "virtio-9p.h" #include "fsdev/qemu-fsdev.h" -#include "9p-xattr.h" #include "coth.h" #include "hw/virtio/virtio-access.h" #include "qemu/iov.h"