This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
/proc/partitions question
- From: erik dot cumps at icos dot be
- To: cygwin at cygwin dot com
- Date: Wed, 22 Oct 2003 16:21:43 +0200
- Subject: /proc/partitions question
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?
If this is an obvious or trivial thing or if this has been
addressed on the mailing list before or on some
website: I apologise. I'm neither a windows nor a cygwin
developer and I have little time but this just struck me
as a bit weird.
Erik.
PS: if the layout of this mail looks weird I blame it
on Lotus Notes which I am forced to use here at work. :(
--
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/