public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Disk geometry from /sys
@ 2008-04-09 20:53 Francis Moreau
  2008-04-09 21:28 ` Lennart Sorensen
                   ` (4 more replies)
  0 siblings, 5 replies; 30+ messages in thread
From: Francis Moreau @ 2008-04-09 20:53 UTC (permalink / raw)
  To: linux-kernel

Hi,

I'm trying to know the geometry of my hard disk from a bash script
and that's the reason I'm looking in /sys. The reason is that I'd like
to figure out the size of a cylinder without doing a
ioctl(bdev, HDIO_GETGEO, &geo)

Unfortunately I can't find anything useful and this is certainly a sign
that I'm doing something wrong.

Or maybe can I simply assume from my script that the geometry
is always heads=255 and the number of sectors per track is 63 for all
disks.

Looking at parted(8) source code, I  can find this:

/* The GETGEO ioctl is no longer useful (as of linux 2.6.x).  We could
 * still use it in 2.4.x, but this is contentious.  Perhaps we should
 * move to EDD. */

Could anybody give me some advices ?
-- 
Francis

^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2008-04-23 13:47 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-09 20:53 Disk geometry from /sys Francis Moreau
2008-04-09 21:28 ` Lennart Sorensen
2008-04-09 21:52   ` Alan Cox
2008-04-09 22:16   ` Bernd Eckenfels
2008-04-10 14:52     ` Lennart Sorensen
2008-04-10 19:23   ` Francis Moreau
2008-04-09 21:57 ` Mark Lord
2008-04-10 19:05   ` Francis Moreau
2008-04-10 19:53     ` Mark Lord
2008-04-10 12:22 ` linux-os (Dick Johnson)
2008-04-10 19:15   ` Francis Moreau
2008-04-10 13:58 ` Bill Davidsen
2008-04-14 12:57 ` Seewer Philippe
2008-04-15  7:40   ` Francis Moreau
2008-04-16  7:49     ` Seewer Philippe
2008-04-17 14:09       ` Francis Moreau
2008-04-17 14:49         ` Seewer Philippe
2008-04-18 13:22           ` Mark Lord
2008-04-18 13:37             ` Seewer Philippe
2008-04-22 20:11               ` Francis Moreau
2008-04-23  6:44                 ` Seewer Philippe
2008-04-23  6:56                   ` Francis Moreau
2008-04-22 20:16             ` Francis Moreau
2008-04-22 22:44               ` Mark Lord
2008-04-23  6:53                 ` Seewer Philippe
2008-04-23  7:02                 ` Francis Moreau
2008-04-23  9:33                   ` Seewer Philippe
2008-04-23 13:47                   ` Mark Lord
2008-04-22 20:10           ` Francis Moreau
2008-04-23  6:48             ` Seewer Philippe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox