* [Qemu-devel] [PATCH] Removing O_LARGEFILE from block layer
@ 2012-09-28 16:45 Richa Marwaha
2012-09-28 20:22 ` Eric Blake
0 siblings, 1 reply; 2+ messages in thread
From: Richa Marwaha @ 2012-09-28 16:45 UTC (permalink / raw)
To: qemu-devel; +Cc: coreyb
QEMU by default configures -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
so there is not need to mention O_LARGEFILE in the block layer.
Signed-off-by: Richa Marwaha <rmarwah@linux.vnet.ibm.com>
---
block/raw-posix.c | 2 +-
block/vdi.c | 2 +-
block/vmdk.c | 6 +++---
block/vvfat.c | 2 +-
4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/block/raw-posix.c b/block/raw-posix.c
index 28d439f..43e3936 100644
--- a/block/raw-posix.c
+++ b/block/raw-posix.c
@@ -965,7 +965,7 @@ static int hdev_open(BlockDriverState *bs, const char *filename, int flags)
if ( bsdPath[ 0 ] != '\0' ) {
strcat(bsdPath,"s0");
/* some CDs don't have a partition 0 */
- fd = qemu_open(bsdPath, O_RDONLY | O_BINARY | O_LARGEFILE);
+ fd = qemu_open(bsdPath, O_RDONLY | O_BINARY);
if (fd < 0) {
bsdPath[strlen(bsdPath)-1] = '1';
} else {
diff --git a/block/vdi.c b/block/vdi.c
index f35b12e..c70b38b 100644
--- a/block/vdi.c
+++ b/block/vdi.c
@@ -659,7 +659,7 @@ static int vdi_create(const char *filename, QEMUOptionParameter *options)
}
fd = qemu_open(filename,
- O_WRONLY | O_CREAT | O_TRUNC | O_BINARY | O_LARGEFILE,
+ O_WRONLY | O_CREAT | O_TRUNC | O_BINARY,
0644);
if (fd < 0) {
return -errno;
diff --git a/block/vmdk.c b/block/vmdk.c
index f2e861b..c673de3 100644
--- a/block/vmdk.c
+++ b/block/vmdk.c
@@ -1252,7 +1252,7 @@ static int vmdk_create_extent(const char *filename, int64_t filesize,
uint32_t tmp, magic, grains, gd_size, gt_size, gt_count;
fd = qemu_open(filename,
- O_WRONLY | O_CREAT | O_TRUNC | O_BINARY | O_LARGEFILE,
+ O_WRONLY | O_CREAT | O_TRUNC | O_BINARY,
0644);
if (fd < 0) {
return -errno;
@@ -1574,11 +1574,11 @@ static int vmdk_create(const char *filename, QEMUOptionParameter *options)
total_size / (int64_t)(63 * 16 * 512));
if (split || flat) {
fd = qemu_open(filename,
- O_WRONLY | O_CREAT | O_TRUNC | O_BINARY | O_LARGEFILE,
+ O_WRONLY | O_CREAT | O_TRUNC | O_BINARY,
0644);
} else {
fd = qemu_open(filename,
- O_WRONLY | O_BINARY | O_LARGEFILE,
+ O_WRONLY | O_BINARY,
0644);
}
if (fd < 0) {
diff --git a/block/vvfat.c b/block/vvfat.c
index 59d3c5b..24cbc71 100644
--- a/block/vvfat.c
+++ b/block/vvfat.c
@@ -1162,7 +1162,7 @@ static int open_file(BDRVVVFATState* s,mapping_t* mapping)
if(!s->current_mapping ||
strcmp(s->current_mapping->path,mapping->path)) {
/* open file */
- int fd = qemu_open(mapping->path, O_RDONLY | O_BINARY | O_LARGEFILE);
+ int fd = qemu_open(mapping->path, O_RDONLY | O_BINARY);
if(fd<0)
return -1;
vvfat_close_current_file(s);
--
1.7.0.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] Removing O_LARGEFILE from block layer
2012-09-28 16:45 [Qemu-devel] [PATCH] Removing O_LARGEFILE from block layer Richa Marwaha
@ 2012-09-28 20:22 ` Eric Blake
0 siblings, 0 replies; 2+ messages in thread
From: Eric Blake @ 2012-09-28 20:22 UTC (permalink / raw)
To: Richa Marwaha; +Cc: coreyb, qemu-devel
[-- Attachment #1: Type: text/plain, Size: 672 bytes --]
On 09/28/2012 10:45 AM, Richa Marwaha wrote:
> QEMU by default configures -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
> so there is not need to mention O_LARGEFILE in the block layer.
>
> Signed-off-by: Richa Marwaha <rmarwah@linux.vnet.ibm.com>
> ---
> block/raw-posix.c | 2 +-
> block/vdi.c | 2 +-
> block/vmdk.c | 6 +++---
> block/vvfat.c | 2 +-
> 4 files changed, 6 insertions(+), 6 deletions(-)
Yay - I've previously suggested this, so it's nice to see it fixed.
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake eblake@redhat.com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 617 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-09-28 20:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-28 16:45 [Qemu-devel] [PATCH] Removing O_LARGEFILE from block layer Richa Marwaha
2012-09-28 20:22 ` Eric Blake
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).