50 lines
1.3 KiB
Diff
50 lines
1.3 KiB
Diff
|
--- eciadsl-usermode-0.12/pusb-linux.c 2007-04-03 22:17:44.000000000 +0200
|
||
|
+++ eciadsl-usermode-cvs-20090423/pusb-linux.c 2008-07-29 11:05:37.000000000 +0200
|
||
|
@@ -4,8 +4,8 @@
|
||
|
|
||
|
*********************************************************************
|
||
|
File : $RCSfile: pusb-linux.c,v $
|
||
|
- Version : $Revision: 1.33 $
|
||
|
- Modified by : $Author: flashcode $ ($Date: 2007/04/03 17:34:12 $)
|
||
|
+ Version : $Revision: 1.34 $
|
||
|
+ Modified by : $Author: flashcode $ ($Date: 2008/07/29 09:05:37 $)
|
||
|
Licence : GPL
|
||
|
*********************************************************************
|
||
|
|
||
|
@@ -29,7 +29,6 @@
|
||
|
#include <string.h>
|
||
|
|
||
|
#include "pusb-linux.h"
|
||
|
-#include <asm/page.h>
|
||
|
|
||
|
#include "pusb.h"
|
||
|
|
||
|
@@ -61,7 +60,7 @@
|
||
|
}__attribute__ ((packed));
|
||
|
|
||
|
/* for ident(1) command */
|
||
|
-static const char id[] = "@(#) $Id: pusb-linux.c,v 1.33 2007/04/03 17:34:12 flashcode Exp $";
|
||
|
+static const char id[] = "@(#) $Id: pusb-linux.c,v 1.34 2008/07/29 09:05:37 flashcode Exp $";
|
||
|
|
||
|
static const char usb_path[] = "/proc/bus/usb";
|
||
|
|
||
|
@@ -431,6 +430,7 @@
|
||
|
static struct usbdevfs_bulktransfer bulk;
|
||
|
static int ret;
|
||
|
int received = 0;
|
||
|
+ int page_size = getpagesize();
|
||
|
|
||
|
do
|
||
|
{
|
||
|
@@ -438,8 +438,8 @@
|
||
|
|
||
|
bulk.len = size;
|
||
|
|
||
|
- if (size > PAGE_SIZE)
|
||
|
- bulk.len = PAGE_SIZE;
|
||
|
+ if (size > page_size)
|
||
|
+ bulk.len = page_size;
|
||
|
|
||
|
bulk.timeout = timeout;
|
||
|
bulk.data = buf;
|