* [Qemu-devel] [PATCH 0/2] virtfs-proxy-helper: Fix and clean include statements
@ 2012-01-11 18:34 Stefan Weil
2012-01-11 18:34 ` [Qemu-devel] [PATCH 1/2] virtfs-proxy-helper: Fix compilation on newer systems Stefan Weil
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Stefan Weil @ 2012-01-11 18:34 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, M. Mohan Kumar, Aneesh Kumar K.V
Obviously most Linux host systems don't have a libcap-dev package.
If this package is available, make tries to build virtfs-proxy-helper
and fails on recent Linux distributions because of a missing attr/xattr.h.
The first patch fixes this. As I noticed that several include statements
were redundant, I added the second patch which is optional but cleans
the code a little bit.
Please consider adding libcap-dev to the Linux build bots (and of course
to the personal Linux environment when you are a maintainer).
Regards,
Stefan Weil
[PATCH 1/2] virtfs-proxy-helper: Fix compilation on newer systems
[PATCH 2/2] virtfs-proxy-helper: Clean include files
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Qemu-devel] [PATCH 1/2] virtfs-proxy-helper: Fix compilation on newer systems
2012-01-11 18:34 [Qemu-devel] [PATCH 0/2] virtfs-proxy-helper: Fix and clean include statements Stefan Weil
@ 2012-01-11 18:34 ` Stefan Weil
2012-01-11 18:34 ` [Qemu-devel] [PATCH 2/2] virtfs-proxy-helper: Clean include files Stefan Weil
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Stefan Weil @ 2012-01-11 18:34 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Stefan Weil, M. Mohan Kumar, Aneesh Kumar K.V
Include file attr/xattr.h is not available on "newer" systems
(for example Fedora 12 or Debian Squeeze).
See comments in qemu-xattr.h for more information.
This file handles the system dependencies automatically.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
---
fsdev/virtfs-proxy-helper.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fsdev/virtfs-proxy-helper.c b/fsdev/virtfs-proxy-helper.c
index 7f8def5..ce7eb79 100644
--- a/fsdev/virtfs-proxy-helper.c
+++ b/fsdev/virtfs-proxy-helper.c
@@ -27,13 +27,13 @@
#include <stdbool.h>
#include <sys/vfs.h>
#include <sys/stat.h>
-#include <attr/xattr.h>
#include <sys/ioctl.h>
#include <linux/fs.h>
#ifdef CONFIG_LINUX_MAGIC_H
#include <linux/magic.h>
#endif
#include "qemu-common.h"
+#include "qemu-xattr.h"
#include "virtio-9p-marshal.h"
#include "hw/9pfs/virtio-9p-proxy.h"
#include "fsdev/virtio-9p-marshal.h"
--
1.7.2.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Qemu-devel] [PATCH 2/2] virtfs-proxy-helper: Clean include files
2012-01-11 18:34 [Qemu-devel] [PATCH 0/2] virtfs-proxy-helper: Fix and clean include statements Stefan Weil
2012-01-11 18:34 ` [Qemu-devel] [PATCH 1/2] virtfs-proxy-helper: Fix compilation on newer systems Stefan Weil
@ 2012-01-11 18:34 ` Stefan Weil
2012-01-12 13:51 ` [Qemu-devel] [PATCH 0/2] virtfs-proxy-helper: Fix and clean include statements Stefan Hajnoczi
2012-01-12 13:53 ` Stefan Hajnoczi
3 siblings, 0 replies; 5+ messages in thread
From: Stefan Weil @ 2012-01-11 18:34 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Stefan Weil, M. Mohan Kumar, Aneesh Kumar K.V
The common standard include files are already included via qemu-common.h,
and for the socket related include files there is qemu_socket.h, so the
code can be reduced by some lines.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
---
fsdev/virtfs-proxy-helper.c | 15 ++-------------
1 files changed, 2 insertions(+), 13 deletions(-)
diff --git a/fsdev/virtfs-proxy-helper.c b/fsdev/virtfs-proxy-helper.c
index ce7eb79..21e9b16 100644
--- a/fsdev/virtfs-proxy-helper.c
+++ b/fsdev/virtfs-proxy-helper.c
@@ -8,31 +8,20 @@
* This work is licensed under the terms of the GNU GPL, version 2. See
* the COPYING file in the top-level directory.
*/
-#include <stdio.h>
-#include <sys/socket.h>
-#include <string.h>
-#include <sys/un.h>
-#include <limits.h>
-#include <signal.h>
-#include <errno.h>
-#include <stdlib.h>
+
#include <sys/resource.h>
-#include <sys/stat.h>
#include <getopt.h>
-#include <unistd.h>
#include <syslog.h>
#include <sys/capability.h>
#include <sys/fsuid.h>
-#include <stdarg.h>
-#include <stdbool.h>
#include <sys/vfs.h>
-#include <sys/stat.h>
#include <sys/ioctl.h>
#include <linux/fs.h>
#ifdef CONFIG_LINUX_MAGIC_H
#include <linux/magic.h>
#endif
#include "qemu-common.h"
+#include "qemu_socket.h"
#include "qemu-xattr.h"
#include "virtio-9p-marshal.h"
#include "hw/9pfs/virtio-9p-proxy.h"
--
1.7.2.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH 0/2] virtfs-proxy-helper: Fix and clean include statements
2012-01-11 18:34 [Qemu-devel] [PATCH 0/2] virtfs-proxy-helper: Fix and clean include statements Stefan Weil
2012-01-11 18:34 ` [Qemu-devel] [PATCH 1/2] virtfs-proxy-helper: Fix compilation on newer systems Stefan Weil
2012-01-11 18:34 ` [Qemu-devel] [PATCH 2/2] virtfs-proxy-helper: Clean include files Stefan Weil
@ 2012-01-12 13:51 ` Stefan Hajnoczi
2012-01-12 13:53 ` Stefan Hajnoczi
3 siblings, 0 replies; 5+ messages in thread
From: Stefan Hajnoczi @ 2012-01-12 13:51 UTC (permalink / raw)
To: Stefan Weil; +Cc: qemu-trivial, M. Mohan Kumar, qemu-devel, Aneesh Kumar K.V
On Wed, Jan 11, 2012 at 07:34:28PM +0100, Stefan Weil wrote:
> Obviously most Linux host systems don't have a libcap-dev package.
>
> If this package is available, make tries to build virtfs-proxy-helper
> and fails on recent Linux distributions because of a missing attr/xattr.h.
>
> The first patch fixes this. As I noticed that several include statements
> were redundant, I added the second patch which is optional but cleans
> the code a little bit.
>
> Please consider adding libcap-dev to the Linux build bots (and of course
> to the personal Linux environment when you are a maintainer).
>
> Regards,
> Stefan Weil
>
> [PATCH 1/2] virtfs-proxy-helper: Fix compilation on newer systems
> [PATCH 2/2] virtfs-proxy-helper: Clean include files
>
Thanks, applied to the trivial patches tree:
https://github.com/stefanha/qemu/commits/trivial-patches
Stefan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH 0/2] virtfs-proxy-helper: Fix and clean include statements
2012-01-11 18:34 [Qemu-devel] [PATCH 0/2] virtfs-proxy-helper: Fix and clean include statements Stefan Weil
` (2 preceding siblings ...)
2012-01-12 13:51 ` [Qemu-devel] [PATCH 0/2] virtfs-proxy-helper: Fix and clean include statements Stefan Hajnoczi
@ 2012-01-12 13:53 ` Stefan Hajnoczi
3 siblings, 0 replies; 5+ messages in thread
From: Stefan Hajnoczi @ 2012-01-12 13:53 UTC (permalink / raw)
To: Stefan Weil; +Cc: qemu-trivial, M. Mohan Kumar, qemu-devel, Aneesh Kumar K.V
On Wed, Jan 11, 2012 at 07:34:28PM +0100, Stefan Weil wrote:
> Please consider adding libcap-dev to the Linux build bots (and of course
> to the personal Linux environment when you are a maintainer).
I have added it to yuzuki.
Stefan
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-01-12 13:53 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-11 18:34 [Qemu-devel] [PATCH 0/2] virtfs-proxy-helper: Fix and clean include statements Stefan Weil
2012-01-11 18:34 ` [Qemu-devel] [PATCH 1/2] virtfs-proxy-helper: Fix compilation on newer systems Stefan Weil
2012-01-11 18:34 ` [Qemu-devel] [PATCH 2/2] virtfs-proxy-helper: Clean include files Stefan Weil
2012-01-12 13:51 ` [Qemu-devel] [PATCH 0/2] virtfs-proxy-helper: Fix and clean include statements Stefan Hajnoczi
2012-01-12 13:53 ` Stefan Hajnoczi
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).