delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/10/23/04:56:23

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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
Date: Thu, 23 Oct 2003 10:55:12 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: /proc/partitions question
Message-ID: <20031023085512.GV1653@cygbert.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <OF2F4D9013 DOT 064D29F0-ONC1256DC7 DOT 004D9A96 AT icos DOT be>
Mime-Version: 1.0
In-Reply-To: <OF2F4D9013.064D29F0-ONC1256DC7.004D9A96@icos.be>
User-Agent: Mutt/1.4.1i

On Wed, Oct 22, 2003 at 04:21:43PM +0200, erik DOT cumps AT icos DOT be wrote:
> Sorry, lost the previous mail so can't continue the thread.
> 
> I took a look at the sources as cgf suggested and
> have the following question:
> 
> in fhandler_proc.cc revision 1.36,
> in function format_proc_partitions() :
> 
> after getting the drive geometry with
> 'IOCTL_DISK_GET_DRIVE_GEOMETRY'
> the size of the disk is calculated in bytes and this number is
> right-shifted 6 bits, so that's a division by 64 and that maps
> with the scaling difference of 16 between df and /proc/partitions.
> 
> likewise after getting the drive's partition layout with
> 'IOCTL_DISK_GET_DRIVE_LAYOUT'
> the length of each parititions (which is in bytes) is again
> right-shifted 6 bits.
> 
> So why the right-shift 6 instead of 10 which would map
> with a blocksize of 1K?

Thanks for tracking this down.  I've applied a patch to Cygwin.  You
should find the corrected version in the next developers snapshot.

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin AT cygwin DOT com
Red Hat, Inc.

--
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