ia64/xen-unstable

changeset 18032:1699ae3e57dc

tapdisk: in case O_DIRECT fails, retry again with o_flags but
O_DIRECT, instead of fixed value O_RD_WR | O_LARGEFILE

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Fri Jul 11 12:43:33 2008 +0100 (2008-07-11)
parents 657bdd581db2
children 1e91c9a4a3f3
files tools/blktap/drivers/block-sync.c
line diff
     1.1 --- a/tools/blktap/drivers/block-sync.c	Fri Jul 11 12:33:00 2008 +0100
     1.2 +++ b/tools/blktap/drivers/block-sync.c	Fri Jul 11 12:43:33 2008 +0100
     1.3 @@ -129,7 +129,7 @@ int tdsync_open (struct disk_driver *dd,
     1.4  
     1.5                  /* Maybe O_DIRECT isn't supported. */
     1.6  		o_flags &= ~O_DIRECT;
     1.7 -                fd = open(name, O_RDWR | O_LARGEFILE);
     1.8 +                fd = open(name, o_flags);
     1.9                  if (fd != -1) DPRINTF("WARNING: Accessing image without"
    1.10                                       "O_DIRECT! (%s)\n", name);
    1.11