From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Tue, 19 Feb 2008 03:18:11 +0300 From: Kirill Maslinsky To: ALT Linux Team development discussions Message-ID: <20080219001811.GD25921@imap.altlinux.org> Mail-Followup-To: ALT Linux Team development discussions References: <20080218173649.02D5B151C8AC@granary.armor.altlinux.org> <20080218223828.GB25921@imap.altlinux.org> <200802190142.09105.ledest@gmail.com> <200802190145.34141.ledest@gmail.com> <20080219000628.GA27741@wo.int.altlinux.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20080219000628.GA27741@wo.int.altlinux.org> User-Agent: Mutt/1.4.2.3i Organization: ALT Docs Team Subject: Re: [devel] asm/page.h X-BeenThere: devel@lists.altlinux.org X-Mailman-Version: 2.1.9 Precedence: list Reply-To: ALT Linux Team development discussions List-Id: ALT Linux Team development discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Feb 2008 00:18:11 -0000 Archived-At: List-Archive: List-Post: On Tue, Feb 19, 2008 at 03:06:28AM +0300, Dmitry V. Levin wrote: > On Tue, Feb 19, 2008 at 01:45:34AM +0200, Led wrote: > > > Это не оно? > > > > > > The user can find the value of PAGE_SIZE by calling getpagesize() defined > > > in unistd.h . > > > > Хотя, наверное, всё же: > > > > -asm/page.h > > +sys/user.h > > Какой-то сомнительный файл. Лучше sysconf(_SC_PAGESIZE). Вот так? --- a/eciadsl-usermode/pusb-linux.c +++ b/eciadsl-usermode/pusb-linux.c @@ -29,7 +29,6 @@ #include #include "pusb-linux.h" -#include #include "pusb.h" @@ -438,8 +437,8 @@ inline int pusb_endpoint_rw(int fd, int ep, unsigned char* buf, int size, int ti bulk.len = size; - if (size > PAGE_SIZE) - bulk.len = PAGE_SIZE; + if (size > sysconf(_SC_PAGESIZE)) + bulk.len = sysconf(_SC_PAGESIZE); bulk.timeout = timeout; bulk.data = buf; И если можно ещё уточнить, что в этом случае писать апстриму? -- Kirill Maslinsky ALT Linux Team