[DRBD-cvs] svn commit by phil - r2149 - trunk/benchmark - Now dm is
able to open files larger than 2G on 32bit sy
drbd-cvs at lists.linbit.com
drbd-cvs at lists.linbit.com
Fri Apr 14 04:04:59 CEST 2006
Author: phil
Date: 2006-04-14 04:04:59 +0200 (Fri, 14 Apr 2006)
New Revision: 2149
Modified:
trunk/benchmark/dm.c
Log:
Now dm is able to open files larger than 2G on 32bit systems,
even on newer systems where one needs to pass O_LARGEFILE
to open(2)
Modified: trunk/benchmark/dm.c
===================================================================
--- trunk/benchmark/dm.c 2006-04-13 16:28:56 UTC (rev 2148)
+++ trunk/benchmark/dm.c 2006-04-14 02:04:59 UTC (rev 2149)
@@ -25,8 +25,8 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/mount.h>
+#define __USE_LARGEFILE64
#include <fcntl.h>
-#define __USE_LARGEFILE64
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
@@ -155,7 +155,7 @@
switch(c)
{
case 'i':
- in_fd = open(optarg,O_RDONLY);
+ in_fd = open(optarg,O_RDONLY|O_LARGEFILE);
if(in_fd==-1)
{
fprintf(stderr,"Can not open input file/device\n");
More information about the drbd-cvs
mailing list