delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/12/07/17:50:12

X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
Subject: RE: Size difference reported by /proc/partitions and lseek(SEEK_END) on block device
Date: Wed, 7 Dec 2005 16:50:06 -0600
Message-ID: <E05F1FD208D5AA45B78B3983479ECF0856C0FA@saturn.p3corpnet.pivot3.com>
From: "Loh, Joe" <joel AT pivot3 DOT com>
To: <cygwin AT cygwin DOT com>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id jB7MoAQg028873

>> On Dec  7 11:17, Loh, Joe wrote:
>> We just installed the cygwin-inst-20051207.tar.bz2 snapshot.  The 
>> output in //proc/partitions is the same as the Cygwin Kernel 1.5.18.

>> However, the lseek(SEEK_END) no longer works.  When I rerun the "C" 
>> program it gave the following error. I even recompiled with the new 
>> snapshot just to make sure, still the same error.  I have also 
>> attached the strace output for the lseekend.
>> 
>> $ ./lseekend.exe /dev/sda
>> lseek: Invalid argument
>
> Ouch.  Thanks for the report.  I have fixed a buggy condition which
only allowed to seek to 1 byte below EOM in CVS.  You should see the
change in the next developers snapshot.
>
>> Here's the output from the snapshot:
>> 
>> major minor  #blocks  name
>> 
>>     8     0  78124095 sda
>>     8     1  15358108 sda1
>>     8     2    104422 sda2
>>     8     3  16386300 sda3
>
> The reason that /proc/partition contains wrong information is that the
/proc/partition information uses an > old, deprecated IOCTL call to
evaluate the disk size by # of cylinders, # of tracks per sektor, etc.
I didn't fix that so far but it's not overly complicated, so stay tuned.

Thank you.  We will give the next snapshot a try.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019