From: riku voipio <riku.voipio@iki.fi>
To: Blue Swirl <blauwirbel@gmail.com>
Cc: Peter Maydell <peter.maydell@linaro.org>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 3/7] linux-user: Implement FS_IOC_FIEMAP ioctl
Date: Sun, 09 Jan 2011 19:47:12 +0200 [thread overview]
Message-ID: <4D29F4A0.1050500@iki.fi> (raw)
In-Reply-To: <AANLkTimZHVe0X8mT481-eQDATusZGECG124LmijXsKxX@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 401 bytes --]
On 01/09/2011 04:47 PM, Blue Swirl wrote:
> This fails if the file doesn't exist:
> CC i386-linux-user/syscall.o
> /src/qemu/linux-user/syscall.c:86:26: error: linux/fiemap.h: No such
> file or directory
> The fix is to introduce a feature check in configure.
Perhaps we can do without configure check, since FS_IOC_FIEMAP is
defined in fs.h if fiemap.h is available. See the attached patch.
[-- Attachment #2: 0001-linux-user-guard-fiemap-with-FS_IOC_FIEMAP.patch --]
[-- Type: text/x-diff, Size: 1520 bytes --]
>From 8c186f5698ce2fa0a3f6faf11122ee0b69d388c8 Mon Sep 17 00:00:00 2001
From: Riku Voipio <riku.voipio@iki.fi>
Date: Sun, 9 Jan 2011 19:37:10 +0200
Subject: [PATCH] linux-user: guard fiemap with FS_IOC_FIEMAP
Compilation of linux-user fails if the file doesn't exist:
CC i386-linux-user/syscall.o
/src/qemu/linux-user/syscall.c:86:26: error: linux/fiemap.h: No such
file or directory
Since FS_IOC_FIEMAP is defined in fs.h, we can use it #ifdef fiemap
support out
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
---
linux-user/syscall.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index f10e17a..c1f506c 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -83,7 +83,9 @@ int __clone2(int (*fn)(void *), void *child_stack_base,
#include <linux/kd.h>
#include <linux/mtio.h>
#include <linux/fs.h>
+#if defined(FS_IOC_FIEMAP)
#include <linux/fiemap.h>
+#endif
#include <linux/fb.h>
#include <linux/vt.h>
#include "linux_loop.h"
@@ -2986,6 +2988,7 @@ struct IOCTLEntry {
#define MAX_STRUCT_SIZE 4096
+#ifdef FS_IOC_FIEMAP
/* So fiemap access checks don't overflow on 32 bit systems.
* This is very slightly smaller than the limit imposed by
* the underlying kernel.
@@ -3072,6 +3075,7 @@ static abi_long do_ioctl_fs_ioc_fiemap(const IOCTLEntry *ie, uint8_t *buf_temp,
}
return ret;
}
+#endif /* FS_IOC_FIEMAP */
static IOCTLEntry ioctl_entries[] = {
#define IOCTL(cmd, access, ...) \
--
1.7.1
next prev parent reply other threads:[~2011-01-09 17:47 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-07 20:52 [Qemu-devel] [PATCH 0/7] linux-user fixes for pull Riku Voipio
2011-01-07 20:52 ` [Qemu-devel] [PATCH 1/7] linux-user: Implement sync_file_range{, 2} syscalls Riku Voipio
2011-01-07 20:52 ` [Qemu-devel] [PATCH 2/7] linux-user: Support ioctls whose parameter size is not constant Riku Voipio
2011-01-07 20:52 ` [Qemu-devel] [PATCH 3/7] linux-user: Implement FS_IOC_FIEMAP ioctl Riku Voipio
2011-01-09 14:47 ` Blue Swirl
2011-01-09 17:47 ` riku voipio [this message]
2011-01-09 19:08 ` Blue Swirl
2011-01-10 4:01 ` Peter Maydell
2011-01-09 20:06 ` Martin Mohring
2011-01-07 20:52 ` [Qemu-devel] [PATCH 4/7] softfloat: Implement floatx80_is_any_nan() and float128_is_any_nan() Riku Voipio
2011-01-07 20:52 ` [Qemu-devel] [PATCH 5/7] linux-user: Fix incorrect NaN detection in ARM nwfpe emulation Riku Voipio
2011-01-07 20:52 ` [Qemu-devel] [PATCH 6/7] Fix commandline handling for ARM semihosted executables Riku Voipio
2011-01-07 20:52 ` [Qemu-devel] [PATCH 7/7] Remove dead code for ARM semihosting commandline handling Riku Voipio
2011-01-08 15:35 ` [Qemu-devel] [PATCH 0/7] linux-user fixes for pull Aurelien Jarno
2011-01-08 23:25 ` [Qemu-devel] [PATCH] linux-user: fix for loopmount ioctl Martin Mohring
2011-01-10 16:18 ` Martin Mohring
2011-01-10 21:13 ` Riku Voipio
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=4D29F4A0.1050500@iki.fi \
--to=riku.voipio@iki.fi \
--cc=blauwirbel@gmail.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.